Forráskód Böngészése

Corner case test for attr_name

Yentl Van Tendeloo 7 éve
szülő
commit
cf9fb235ae
1 módosított fájl, 7 hozzáadás és 0 törlés
  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")