Relax moving restrictions in project tree, and improve test coverage of NWItem class

This commit is contained in:
Veronica Berglyd Olsen
2022-04-17 18:32:22 +02:00
parent 50db7fcddb
commit 3f4356467e
3 changed files with 130 additions and 12 deletions
+6 -3
View File
@@ -259,7 +259,7 @@ class NWItem():
return
##
# Methods
# Lookup Methods
##
def describeMe(self, hLevel=None):
@@ -296,8 +296,7 @@ class NWItem():
return self._class in (nwItemClass.NOVEL, nwItemClass.ARCHIVE, nwItemClass.TRASH)
def isInactive(self):
"""Returns true if the item is in the inactive parts of the
project.
"""Returns true if the item is in an inactive class.
"""
return self._class in (nwItemClass.NO_CLASS, nwItemClass.ARCHIVE, nwItemClass.TRASH)
@@ -313,6 +312,10 @@ class NWItem():
stIcon = self.theProject.importItems.icon(self._import)
return stName, stIcon
##
# Special Setters
##
def setImportStatus(self, value):
"""Update the importance or status value based on class. This is
a wrapper setter for setStatus and setImport.