Code Duplication    Length = 12-12 lines in 2 locations

tests/test_main.py 2 locations

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