Beispiel #1
0
def test_LessThanDay():
    assert less_than_day(32) == "32 seconds ago"
    assert less_than_day(100) == "a minute ago"
    assert less_than_day(2645) == "44 minutes ago"
    assert less_than_day(5200) == "an hour ago"
    assert less_than_day(68500) == "19 hours ago"
    assert less_than_day(86401) == None
Beispiel #2
0
def test_seconds_friendly_message():
    assert (less_than_day(15) == "15 seconds ago")
Beispiel #3
0
def test_more_hours_friendly_message():
    assert (less_than_day(82800) == "23 hours ago")
Beispiel #4
0
def test_hours_friendly_message():
    assert (less_than_day(7300) == "2 hours ago")
Beispiel #5
0
def test_hour_friendly_message():
    assert (less_than_day(7000) == "an hour ago")
Beispiel #6
0
def test_minutes_friendly_message():
    assert (less_than_day(300) == "5 minutes ago")
Beispiel #7
0
def tests_minuteminutes_friendly_message():
    assert (less_than_day(120) == "2 minutes ago")
Beispiel #8
0
def test_minute_friendly_message():
    assert (less_than_day(100) == "a minute ago")
Beispiel #9
0
def test_secondsminute_friendly_message():
    assert (less_than_day(60) == "a minute ago")