def newSubTask(self, tasks=None, markCompleted=False): tasks = tasks or [] newSubTask = command.NewSubTaskCommand(self.taskList, tasks) if markCompleted: for subtask in newSubTask.items: subtask.setCompletionDateTime() newSubTask.do()
def testItemsAreNew(self): self.failUnless(command.NewSubTaskCommand(self.taskList, []).items_are_new())
def createCommand(self): newSubTaskCommand = command.NewSubTaskCommand(self.taskList, [self.task]) self.subtask = newSubTaskCommand.items[0] # pylint: disable-msg=W0201 return newSubTaskCommand