def saveAndLoad(self, tasks, categories=None): categories = categories or [] self.emptyTaskFile.tasks().extend(tasks) self.emptyTaskFile.categories().extend(categories) self.emptyTaskFile.save() self.emptyTaskFile.load() self.assertEqual([task.subject() for task in tasks], [task.subject() for task in self.emptyTaskFile.tasks()]) self.assertEqual([category.subject() for category in categories], [category.subject() for category in self.emptyTaskFile.categories()])
def addPage(self, category): page = CategoryEditBook(self._interior, category, self) self._interior.AddPage(page, category.subject())
def getItemText(self, index): # FIXME: pull up to TreeViewer category = self.getItemWithIndex(index) return category.subject()
def renderCategory(self, task): return ', '.join(sorted([category.subject() for category in task.categories()]))