Code Duplication    Length = 12-12 lines in 2 locations

tests/test_main.py 2 locations

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