Code Duplication    Length = 15-15 lines in 2 locations

tests/models/test_evc_base.py 2 locations

@@ 98-112 (lines=15) @@
95
            evc.update(**update_dict)
96
        self.assertEqual(str(handle_error.exception), error_message)
97
98
    def test_update_uni_z(self):
99
        """Test if raises and error when trying to update the uni_z."""
100
        attributes = {
101
            "name": "circuit_name",
102
            "uni_a": get_uni_mocked(is_valid=True),
103
            "uni_z": get_uni_mocked(is_valid=True)
104
        }
105
        update_dict = {
106
            "uni_z": get_uni_mocked(is_valid=True)
107
        }
108
        error_message = "uni_z can't be be updated."
109
        with self.assertRaises(ValueError) as handle_error:
110
            evc = EVC(**attributes)
111
            evc.update(**update_dict)
112
        self.assertEqual(str(handle_error.exception), error_message)
113
114
    def test_circuit_representation(self):
115
        """Test the method __repr__."""
@@ 82-96 (lines=15) @@
79
        evc.update(**update_dict)
80
        self.assertEqual(evc.name, update_dict['name'])
81
82
    def test_update_uni_a(self):
83
        """Test if raises and error when trying to update the uni_a."""
84
        attributes = {
85
            "name": "circuit_name",
86
            "uni_a": get_uni_mocked(is_valid=True),
87
            "uni_z": get_uni_mocked(is_valid=True)
88
        }
89
        update_dict = {
90
            "uni_a": get_uni_mocked(is_valid=True)
91
        }
92
        error_message = "uni_a can't be be updated."
93
        with self.assertRaises(ValueError) as handle_error:
94
            evc = EVC(**attributes)
95
            evc.update(**update_dict)
96
        self.assertEqual(str(handle_error.exception), error_message)
97
98
    def test_update_uni_z(self):
99
        """Test if raises and error when trying to update the uni_z."""