Code Duplication    Length = 14-14 lines in 2 locations

tests/test_models.py 1 location

@@ 327-340 (lines=14) @@
324
        self.assertFalse(evc.should_deploy(attributes['primary_links']))
325
        log_mock.debug.assert_called_with(f'{evc} is disabled.')
326
327
    @patch('napps.kytos.mef_eline.models.log')
328
    def test_should_deploy_case3(self, log_mock):
329
        """Test should deploy method with enabled and not active circuit."""
330
        log_mock.debug.return_value = True
331
        attributes = {
332
            "name": "custom_name",
333
            "uni_a": get_uni_mocked(is_valid=True),
334
            "uni_z": get_uni_mocked(is_valid=True),
335
            "primary_links": [get_link_mocked(), get_link_mocked()],
336
            "enabled": True
337
        }
338
        evc = EVC(**attributes)
339
        self.assertTrue(evc.should_deploy(attributes['primary_links']))
340
        log_mock.debug.assert_called_with(f'{evc} will be deployed.')
341
342
    @patch('napps.kytos.mef_eline.models.log')
343
    def test_should_deploy_case4(self, log_mock):

tests/models/test_evc_deploy.py 1 location

@@ 56-69 (lines=14) @@
53
        self.assertFalse(evc.should_deploy(attributes['primary_links']))
54
        log_mock.debug.assert_called_with(f'{evc} is disabled.')
55
56
    @patch('napps.kytos.mef_eline.models.log')
57
    def test_should_deploy_case3(self, log_mock):
58
        """Test should deploy method with enabled and not active circuit."""
59
        log_mock.debug.return_value = True
60
        attributes = {
61
            "name": "custom_name",
62
            "uni_a": get_uni_mocked(is_valid=True),
63
            "uni_z": get_uni_mocked(is_valid=True),
64
            "primary_links": [get_link_mocked(), get_link_mocked()],
65
            "enabled": True
66
        }
67
        evc = EVC(**attributes)
68
        self.assertTrue(evc.should_deploy(attributes['primary_links']))
69
        log_mock.debug.assert_called_with(f'{evc} will be deployed.')
70
71
    @patch('napps.kytos.mef_eline.models.log')
72
    def test_should_deploy_case4(self, log_mock):