Пример #1
0
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
Пример #2
0
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
Пример #3
0
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)
Пример #4
0
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)