Code Duplication    Length = 10-10 lines in 2 locations

tests/test_models.py 1 location

@@ 112-121 (lines=10) @@
109
            EVC(**attributes)
110
        self.assertEqual(str(handle_error.exception), error_message)
111
112
    def test_with_invalid_uni_a(self):
113
        """Test if the EVC raises and error with invalid UNI A."""
114
        attributes = {
115
            "name": "circuit_name",
116
            "uni_a": get_uni_mocked(tag_value=82)
117
        }
118
        error_message = "VLAN tag 82 is not available in uni_a"
119
        with self.assertRaises(ValueError) as handle_error:
120
            EVC(**attributes)
121
        self.assertEqual(str(handle_error.exception), error_message)
122
123
    def test_without_uni_z(self):
124
        """Test if the EVC raises and error with UNI Z is required."""

tests/models/test_evc_base.py 1 location

@@ 34-43 (lines=10) @@
31
            EVC(**attributes)
32
        self.assertEqual(str(handle_error.exception), error_message)
33
34
    def test_with_invalid_uni_a(self):
35
        """Test if the EVC raises and error with invalid UNI A."""
36
        attributes = {
37
            "name": "circuit_name",
38
            "uni_a": get_uni_mocked(tag_value=82)
39
        }
40
        error_message = "VLAN tag 82 is not available in uni_a"
41
        with self.assertRaises(ValueError) as handle_error:
42
            EVC(**attributes)
43
        self.assertEqual(str(handle_error.exception), error_message)
44
45
    def test_without_uni_z(self):
46
        """Test if the EVC raises and error with UNI Z is required."""