def test_is_overdated_with_date_not_passed(self): """ is_overdated() returns Flse for task whose due_date is not passed """ date = datetime.date.today() due_task = Task(title='Task2', due_date=date+datetime.timedelta(days=1)) self.assertIs(due_task.is_overdated(), False)
def test_is_overdated_with_due_date_passed(self): """ is_overdated() returns True for task whose due_date is passe """ date = datetime.date.today() overdated_task = Task(title='Task1', due_date=date-datetime.timedelta(days=1)) self.assertIs(overdated_task.is_overdated(), True)