def test_is_course_complete_should_give_true_if_there_was_no_recent_update(): delta = coursera_dl.total_seconds(datetime.timedelta(days=31)) tm = time() - delta rv = coursera_dl.is_course_complete(tm) assert rv is True
def test_is_course_complete_should_give_false_if_there_was_recent_update(): delta = coursera_dl.total_seconds(datetime.timedelta(days=29)) tm = time() - delta rv = coursera_dl.is_course_complete(tm) assert rv is False
def test_is_course_complete_should_give_true_if_there_was_no_recent_update(): delta = coursera_dl.total_seconds(datetime.timedelta(days=31)) tm = time() - delta rv = coursera_dl.is_course_complete(tm) assertTrue(rv)
def test_is_course_complete_should_give_false_if_there_was_recent_update(): delta = coursera_dl.total_seconds(datetime.timedelta(days=29)) tm = time() - delta rv = coursera_dl.is_course_complete(tm) assertFalse(rv)