def test_importance_1(self): task = copy.copy(self.taskA) self.assertEqual(tracker.importance(task,10), 1) self.assertEqual(tracker.importance(task,15), 1) task['priority'] =u'0' self.assertEqual(tracker.importance(task,10), 2) self.assertEqual(tracker.importance(task,15), 2) task['priority'] =u'1' self.assertEqual(tracker.importance(task,10), 3) self.assertEqual(tracker.importance(task,15), 3) task['priority'] =u'2' self.assertEqual(tracker.importance(task,10), 4) self.assertEqual(tracker.importance(task,15), 4) task['priority'] =u'3' self.assertEqual(tracker.importance(task,10), 5) self.assertEqual(tracker.importance(task,15), 5)
def test_importance_5(self): task = copy.copy(self.taskC) self.assertEqual(tracker.importance(task,14)==-1,False) self.assertEqual(tracker.importance(task,15)==-1,False) self.assertEqual(tracker.importance(task,16), -1)
def test_importance_4(self): task = copy.copy(self.taskC) self.assertEqual(tracker.importance(task,4), -1) self.assertEqual(tracker.importance(task,5), -1) self.assertEqual(tracker.importance(task,6), -1) self.assertEqual(tracker.importance(task,7)==-1,False)