Пример #1
0
 def test_has_duedate_passed_with_date_not_passed(self):
     """
     has_duedate_passed() returns Flse for task whose
     due_on is not passed
     """
     date = datetime.date.today()
     due_task = Task(title='Task2',
                     due_on=date + datetime.timedelta(days=1))
     self.assertIs(due_task.has_duedate_passed(), False)
Пример #2
0
 def test_has_duedate_passed_with_due_on_passed(self):
     """
     is_overdated() returns True for task whose due_on
     is passe
     """
     date = datetime.date.today()
     overdated_task = Task(title='Task1',
                           due_on=date - datetime.timedelta(days=1))
     self.assertIs(overdated_task.has_duedate_passed(), True)