Code Duplication    Length = 12-12 lines in 2 locations

tests/test_main.py 2 locations

@@ 155-166 (lines=12) @@
152
        expected_result = circuits['1']
153
        self.assertEqual(json.loads(response.data), expected_result)
154
155
    @patch('napps.kytos.mef_eline.storehouse.StoreHouse.get_data')
156
    def test_circuit_with_invalid_id(self, storehouse_data_mock):
157
        """Test if get_circuit return invalid circuit_id."""
158
        circuits = {'1': {'name': 'circuit_1'},
159
                    '2': {'name': 'circuit_2'}}
160
        storehouse_data_mock.return_value = circuits
161
162
        api = self.get_app_test_client(self.napp)
163
        url = f'{self.server_name_url}/v2/evc/3'
164
        response = api.get(url)
165
        expected_result = {'response': 'circuit_id 3 not found'}
166
        self.assertEqual(json.loads(response.data), expected_result)
167
168
    @patch('napps.kytos.mef_eline.storehouse.StoreHouse.get_data')
169
    @patch('napps.kytos.mef_eline.scheduler.Scheduler.add')
@@ 142-153 (lines=12) @@
139
        expected_result = circuits
140
        self.assertEqual(json.loads(response.data), expected_result)
141
142
    @patch('napps.kytos.mef_eline.storehouse.StoreHouse.get_data')
143
    def test_circuit_with_valid_id(self, storehouse_data_mock):
144
        """Test if get_circuit return the circuit attributes."""
145
        circuits = {'1': {'name': 'circuit_1'},
146
                    '2': {'name': 'circuit_2'}}
147
        storehouse_data_mock.return_value = circuits
148
149
        api = self.get_app_test_client(self.napp)
150
        url = f'{self.server_name_url}/v2/evc/1'
151
        response = api.get(url)
152
        expected_result = circuits['1']
153
        self.assertEqual(json.loads(response.data), expected_result)
154
155
    @patch('napps.kytos.mef_eline.storehouse.StoreHouse.get_data')
156
    def test_circuit_with_invalid_id(self, storehouse_data_mock):