Explorar o código

Corner case test for attr_name

Yentl Van Tendeloo %!s(int64=7) %!d(string=hai) anos
pai
achega
cf9fb235ae
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      unit/test_all.py

+ 7 - 0
unit/test_all.py

@@ -2577,6 +2577,13 @@ class TestModelverse(unittest.TestCase):
         # Check inheritance as well
         assert read_defined_attrs("users/user/test/a", "E") == ({"edge_value": "Natural", "other_name": "String", "next_attr": "String"}, {"other_value": "String"})
 
+        # Attribute not defined here
+        try:
+            attribute_name("users/user/test/a", "D", "new_value", "newer_value")
+            self.fail()
+        except SuperclassAttribute:
+            pass
+
         # Non-existing model
         try:
             attribute_name("users/afa", "A", "value", "str")