Code Duplication    Length = 12-12 lines in 2 locations

tests/test_main.py 2 locations

@@ 96-107 (lines=12) @@
93
        expected_result = circuits['1']
94
        self.assertEqual(json.loads(response.data), expected_result)
95
96
    @patch('napps.kytos.mef_eline.storehouse.StoreHouse.get_data')
97
    def test_circuit_with_invalid_id(self, storehouse_data_mock):
98
        """Test if get_circuit return invalid circuit_id."""
99
        circuits = {'1': {'name': 'circuit_1'},
100
                    '2': {'name': 'circuit_2'}}
101
        storehouse_data_mock.return_value = circuits
102
103
        api = self.get_app_test_client(self.napp)
104
        url = f'{self.server_name_url}/v2/evc/3'
105
        response = api.get(url)
106
        expected_result = {'response': 'circuit_id 3 not found'}
107
        self.assertEqual(json.loads(response.data), expected_result)
108
109
    @patch('napps.kytos.mef_eline.storehouse.StoreHouse.get_data')
110
    @patch('napps.kytos.mef_eline.scheduler.Scheduler.add')
@@ 83-94 (lines=12) @@
80
        expected_result = circuits
81
        self.assertEqual(json.loads(response.data), expected_result)
82
83
    @patch('napps.kytos.mef_eline.storehouse.StoreHouse.get_data')
84
    def test_circuit_with_valid_id(self, storehouse_data_mock):
85
        """Test if get_circuit return the circuit attributes."""
86
        circuits = {'1': {'name': 'circuit_1'},
87
                    '2': {'name': 'circuit_2'}}
88
        storehouse_data_mock.return_value = circuits
89
90
        api = self.get_app_test_client(self.napp)
91
        url = f'{self.server_name_url}/v2/evc/1'
92
        response = api.get(url)
93
        expected_result = circuits['1']
94
        self.assertEqual(json.loads(response.data), expected_result)
95
96
    @patch('napps.kytos.mef_eline.storehouse.StoreHouse.get_data')
97
    def test_circuit_with_invalid_id(self, storehouse_data_mock):