Пример #1
0
 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()])
Пример #2
0
 def addPage(self, category):
     page = CategoryEditBook(self._interior, category, self)
     self._interior.AddPage(page, category.subject())
Пример #3
0
 def getItemText(self, index):    # FIXME: pull up to TreeViewer
     category = self.getItemWithIndex(index)
     return category.subject()
Пример #4
0
 def renderCategory(self, task):
     return ', '.join(sorted([category.subject() for category in task.categories()]))