def testInitialTrackingStateWhenTaskIsTracked(self): self.task.addEffort(self.trackedEffort) composite = effort.CompositeEffortPerPeriod(self.composite.getStart(), self.composite.getStop(), self.taskList, self.trackedEffort) self.failUnless(composite.isBeingTracked())
def setUp(self): self.taskList = task.TaskList() self.effortList = effort.EffortList(self.taskList) self.task = task.Task(subject='task') self.taskList.append(self.task) self.effort1 = effort.Effort(self.task, date.DateTime(2004, 1, 1, 11, 0, 0), date.DateTime(2004, 1, 1, 12, 0, 0)) self.effort2 = effort.Effort(self.task, date.DateTime(2004, 1, 1, 13, 0, 0), date.DateTime(2004, 1, 1, 14, 0, 0)) self.effort3 = effort.Effort(self.task, date.DateTime(2004, 1, 11, 13, 0, 0), date.DateTime(2004, 1, 11, 14, 0, 0)) self.trackedEffort = effort.Effort(self.task, date.DateTime(2004, 1, 1, 9, 0, 0)) self.composite = effort.CompositeEffortPerPeriod(\ date.DateTime(2004,1,1,0,0,0), date.DateTime(2004,1,1,23,59,59), self.taskList)
def setUp(self): task.Task.settings = config.Settings(load=False) self.taskList = task.TaskList() self.effortList = effort.EffortList(self.taskList) self.task = task.Task(subject='task') self.taskList.append(self.task) self.effort1 = effort.Effort(self.task, date.DateTime(2004, 1, 1, 11, 0, 0), date.DateTime(2004, 1, 1, 12, 0, 0)) self.effort2 = effort.Effort(self.task, date.DateTime(2004, 1, 1, 13, 0, 0), date.DateTime(2004, 1, 1, 14, 0, 0)) self.effort3 = effort.Effort(self.task, date.DateTime(2004, 1, 11, 13, 0, 0), date.DateTime(2004, 1, 11, 14, 0, 0)) self.trackedEffort = effort.Effort(self.task, date.DateTime(2004, 1, 1, 9, 0, 0)) self.composite = effort.CompositeEffortPerPeriod(\ date.DateTime(2004, 1, 1, 0, 0, 0), date.DateTime(2004, 1, 1, 23, 59, 59), self.taskList) self.reducer = EffortCompositeTest.FakeEffortAggregator(self.composite)