Esempio n. 1
0
 def setUp(self):
     task.Task.settings = config.Settings(load=False)
     self.task = task.Task(subject='task')
     self.child = task.Task(subject='child')
     self.task.addChild(self.child)
     self.taskEffort = effort.Effort(self.task,
                                     date.DateTime(2004, 1, 1, 11, 0, 0),
                                     date.DateTime(2004, 1, 1, 12, 0, 0))
     self.childEffort = effort.Effort(self.child,
                                      date.DateTime(2004, 1, 1, 11, 0, 0),
                                      date.DateTime(2004, 1, 1, 12, 0, 0))
     self.composite = effort.CompositeEffort(
         self.task, date.DateTime(2004, 1, 1, 0, 0, 0),
         date.DateTime(2004, 1, 1, 23, 59, 59))
     self.fakeAggregator = FakeEffortAggregator(self.composite)
     self.task.addEffort(self.taskEffort)
     self.child.addEffort(self.childEffort)
Esempio n. 2
0
 def setUp(self):
     self.task = task.Task(subject='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.CompositeEffort(
         self.task, date.DateTime(2004, 1, 1, 0, 0, 0),
         date.DateTime(2004, 1, 1, 23, 59, 59))
     self.events = []
Esempio n. 3
0
 def setUp(self):
     task.Task.settings = config.Settings(load=False)
     self.task = task.Task(subject='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.CompositeEffort(
         self.task, date.DateTime(2004, 1, 1, 0, 0, 0),
         date.DateTime(2004, 1, 1, 23, 59, 59))
     self.fakeAggregator = FakeEffortAggregator(self.composite)
Esempio n. 4
0
 def setUp(self):
     task.Task.settings = config.Settings(load=False)
     self.task = task.Task(subject='task')
     self.child = task.Task(subject='child')
     self.child2 = task.Task(subject='child2')
     self.task.addChild(self.child)
     self.taskEffort = effort.Effort(self.task,
                                     date.DateTime(2004, 1, 1, 11, 0, 0),
                                     date.DateTime(2004, 1, 1, 12, 0, 0))
     self.childEffort = effort.Effort(self.child,
                                      date.DateTime(2004, 1, 1, 11, 0, 0),
                                      date.DateTime(2004, 1, 1, 12, 0, 0))
     self.child2Effort = effort.Effort(self.child2,
                                       date.DateTime(2004, 1, 1, 11, 0, 0),
                                       date.DateTime(2004, 1, 1, 12, 0, 0))
     self.trackedEffort = effort.Effort(self.child,
                                        date.DateTime(2004, 1, 1, 9, 0, 0))
     self.composite = effort.CompositeEffort(
         self.task, date.DateTime(2004, 1, 1, 0, 0, 0),
         date.DateTime(2004, 1, 1, 23, 59, 59))
     self.events = []
Esempio n. 5
0
 def setUp(self):
     task.Task.settings = config.Settings(load=False)
     self.task = task.Task(subject='task')
     self.effort1 = effort.Effort(self.task,
                                  date.DateTime(2004, 1, 1, 11, 0, 0),
                                  date.DateTime(2004, 1, 1, 11, 0, 45))
     self.effort2 = effort.Effort(self.task,
                                  date.DateTime(2004, 1, 1, 12, 0, 0),
                                  date.DateTime(2004, 1, 1, 12, 0, 45))
     self.effort3 = effort.Effort(self.task,
                                  date.DateTime(2004, 1, 1, 13, 0, 0),
                                  date.DateTime(2004, 1, 1, 13, 0, 45))
     self.effort4 = effort.Effort(self.task,
                                  date.DateTime(2004, 1, 1, 13, 0, 0),
                                  date.DateTime(2004, 1, 1, 13, 0, 10))
     self.composite = effort.CompositeEffort(
         self.task, date.DateTime(2004, 1, 1, 0, 0, 0),
         date.DateTime(2004, 1, 1, 23, 59, 59))
     self.task.addEffort(self.effort1)
     self.task.addEffort(self.effort2)
     self.task.addEffort(self.effort3)
     self.task.addEffort(self.effort4)
Esempio n. 6
0
 def testInitialTrackingStateWhenTaskIsTracked(self):
     self.task.addEffort(self.trackedEffort)
     composite = effort.CompositeEffort(self.task,
                                        self.composite.getStart(),
                                        self.composite.getStop())
     self.failUnless(composite.isBeingTracked())