Code Duplication    Length = 11-11 lines in 2 locations

tests/test_models.py 1 location

@@ 134-144 (lines=11) @@
131
            EVC(**attributes)
132
        self.assertEqual(str(handle_error.exception), error_message)
133
134
    def test_with_invalid_uni_z(self):
135
        """Test if the EVC raises and error with UNI Z is required."""
136
        attributes = {
137
            "name": "circuit_name",
138
            "uni_a": get_uni_mocked(is_valid=True),
139
            "uni_z": get_uni_mocked(tag_value=83)
140
        }
141
        error_message = "VLAN tag 83 is not available in uni_z"
142
        with self.assertRaises(ValueError) as handle_error:
143
            EVC(**attributes)
144
        self.assertEqual(str(handle_error.exception), error_message)
145
146
    def test_update_name(self):
147
        """Test if raises and error when trying to update the name."""

tests/models/test_evc_base.py 1 location

@@ 56-66 (lines=11) @@
53
            EVC(**attributes)
54
        self.assertEqual(str(handle_error.exception), error_message)
55
56
    def test_with_invalid_uni_z(self):
57
        """Test if the EVC raises and error with UNI Z is required."""
58
        attributes = {
59
            "name": "circuit_name",
60
            "uni_a": get_uni_mocked(is_valid=True),
61
            "uni_z": get_uni_mocked(tag_value=83)
62
        }
63
        error_message = "VLAN tag 83 is not available in uni_z"
64
        with self.assertRaises(ValueError) as handle_error:
65
            EVC(**attributes)
66
        self.assertEqual(str(handle_error.exception), error_message)
67
68
    def test_update_name(self):
69
        """Test if raises and error when trying to update the name."""