Code Duplication    Length = 10-10 lines in 2 locations

tests/test_models.py 1 location

@@ 123-132 (lines=10) @@
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."""
125
        attributes = {
126
            "name": "circuit_name",
127
            "uni_a": get_uni_mocked(is_valid=True)
128
        }
129
        error_message = "uni_z is required."
130
        with self.assertRaises(ValueError) as handle_error:
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."""

tests/models/test_evc_base.py 1 location

@@ 45-54 (lines=10) @@
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."""
47
        attributes = {
48
            "name": "circuit_name",
49
            "uni_a": get_uni_mocked(is_valid=True)
50
        }
51
        error_message = "uni_z is required."
52
        with self.assertRaises(ValueError) as handle_error:
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."""