Exemple #1
0
 def setUp(self):
     task.Task.settings = config.Settings(load=False)
     self.taskList = task.TaskList()
     self.effortList = effort.EffortList(self.taskList)
     self.sorter = effort.EffortSorter(self.effortList)
     self.task = task.Task('Task')
     self.oldestEffort = effort.Effort(self.task, date.DateTime(2004, 1, 1),
                                       date.DateTime(2004, 1, 2))
     self.newestEffort = effort.Effort(self.task, date.DateTime(2004, 2, 1),
                                       date.DateTime(2004, 2, 2))
     self.task.addEffort(self.oldestEffort)
     self.task.addEffort(self.newestEffort)
     self.taskList.append(self.task)
Exemple #2
0
 def setUp(self):
     self.taskList = task.TaskList()
     self.effortPerDay = effort.EffortSorter(
         effort.EffortAggregator(self.taskList, aggregation='day'))
     self.effortPerWeek = effort.EffortSorter(
         effort.EffortAggregator(self.taskList, aggregation='week'))
Exemple #3
0
 def testCreateWhenEffortListIsFilled(self):
     sorter = effort.EffortSorter(self.effortList)
     self.assertEqual([self.newestEffort, self.oldestEffort], sorter)
 def createCommand(self):
     sortedEfforts = effort.EffortSorter(self.effortList)
     return command.EditEffortCommand(sortedEfforts, sortedEfforts)