Skip to content

Commit 537703e

Browse files
committed
[test_property] Adapt Test for Leaf Export Parent Properties
1 parent d0d5d9c commit 537703e

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

test/test_property.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -770,11 +770,19 @@ def test_export_leaf(self):
770770
values = [3]
771771
second.create_property(name, value=values)
772772

773-
ex = second.properties["prop2"].export_leaf()
774-
self.assertEqual(len(ex.sections), 1)
775-
self.assertEqual(len(ex['first'].properties), 0)
776-
self.assertEqual(len(ex['first'].sections), 1)
777-
self.assertEqual(len(ex['first']['second'].properties), 1)
773+
name = "prop5"
774+
values = ["abc"]
775+
first.create_property(name, value=values)
776+
777+
ex1 = first.properties["prop1"].export_leaf()
778+
self.assertEqual(len(ex1['first'].properties), 1)
779+
self.assertEqual(len(ex1['first'].sections), 0)
780+
781+
ex2 = second.properties["prop2"].export_leaf()
782+
self.assertEqual(len(ex2.sections), 1)
783+
self.assertEqual(len(ex2['first'].properties), 2)
784+
self.assertEqual(len(ex2['first'].sections), 1)
785+
self.assertEqual(len(ex2['first']['second'].properties), 1)
778786

779787

780788
if __name__ == "__main__":

0 commit comments

Comments
 (0)