Code Duplication    Length = 15-15 lines in 2 locations

tests/unit/models/test_evc_deploy.py 2 locations

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