Code cleanup in core classes and rename of parHandle to itemParent in NWItem class

This commit is contained in:
Veronica K. B. Olsen
2020-10-15 19:08:35 +02:00
parent d973f28755
commit 1923a55443
11 changed files with 47 additions and 41 deletions
+5 -5
View File
@@ -31,13 +31,13 @@ def testItemSettersSimple(nwDummy):
# Parent
theItem.setParent(None)
assert theItem.parHandle is None
assert theItem.itemParent is None
theItem.setParent(123)
assert theItem.parHandle is None
assert theItem.itemParent is None
theItem.setParent("0123456789abcdef")
assert theItem.parHandle is None
assert theItem.itemParent is None
theItem.setParent("0123456789abc")
assert theItem.parHandle == "0123456789abc"
assert theItem.itemParent == "0123456789abc"
# Order
theItem.setOrder(None)
@@ -227,7 +227,7 @@ def testItemXMLPackUnpack(nwDummy):
# Unpack
assert theItem.unpackXML(xContent[0])
assert theItem.itemHandle == "0123456789abc"
assert theItem.parHandle == "0123456789abc"
assert theItem.itemParent == "0123456789abc"
assert theItem.itemOrder == 1
assert theItem.isExpanded
assert theItem.paraCount == 3