Code Duplication    Length = 15-15 lines in 2 locations

tests/unit/models/test_evc_deploy.py 2 locations

@@ 77-91 (lines=15) @@
74
        assert evc.should_deploy(attributes["primary_links"]) is False
75
        log_mock.debug.assert_called_with(f"{evc} is disabled.")
76
77
    @patch("napps.kytos.mef_eline.models.evc.log")
78
    def test_should_deploy_case3(self, log_mock):
79
        """Test should deploy method with enabled and not active circuit."""
80
        log_mock.debug.return_value = True
81
        attributes = {
82
            "controller": get_controller_mock(),
83
            "name": "custom_name",
84
            "uni_a": get_uni_mocked(is_valid=True),
85
            "uni_z": get_uni_mocked(is_valid=True),
86
            "primary_links": [get_link_mocked(), get_link_mocked()],
87
            "enabled": True,
88
        }
89
        evc = EVC(**attributes)
90
        assert evc.should_deploy(attributes["primary_links"]) is True
91
        log_mock.debug.assert_called_with(f"{evc} will be deployed.")
92
93
    @patch("napps.kytos.mef_eline.models.evc.log")
94
    def test_should_deploy_case4(self, log_mock):
@@ 61-75 (lines=15) @@
58
        evc.should_deploy()
59
        log_mock.debug.assert_called_with("Path is empty.")
60
61
    @patch("napps.kytos.mef_eline.models.evc.log")
62
    def test_should_deploy_case2(self, log_mock):
63
        """Test should deploy method with disable circuit."""
64
        log_mock.debug.return_value = True
65
        attributes = {
66
            "controller": get_controller_mock(),
67
            "name": "custom_name",
68
            "uni_a": get_uni_mocked(is_valid=True),
69
            "uni_z": get_uni_mocked(is_valid=True),
70
            "primary_links": [get_link_mocked(), get_link_mocked()],
71
        }
72
        evc = EVC(**attributes)
73
74
        assert evc.should_deploy(attributes["primary_links"]) is False
75
        log_mock.debug.assert_called_with(f"{evc} is disabled.")
76
77
    @patch("napps.kytos.mef_eline.models.evc.log")
78
    def test_should_deploy_case3(self, log_mock):