Code Duplication    Length = 15-15 lines in 2 locations

tests/unit/models/test_evc_deploy.py 2 locations

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