Ejemplo n.º 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
Ejemplo n.º 2
0
def test_seconds_friendly_message():
    assert (less_than_day(15) == "15 seconds ago")
Ejemplo n.º 3
0
def test_more_hours_friendly_message():
    assert (less_than_day(82800) == "23 hours ago")
Ejemplo n.º 4
0
def test_hours_friendly_message():
    assert (less_than_day(7300) == "2 hours ago")
Ejemplo n.º 5
0
def test_hour_friendly_message():
    assert (less_than_day(7000) == "an hour ago")
Ejemplo n.º 6
0
def test_minutes_friendly_message():
    assert (less_than_day(300) == "5 minutes ago")
Ejemplo n.º 7
0
def tests_minuteminutes_friendly_message():
    assert (less_than_day(120) == "2 minutes ago")
Ejemplo n.º 8
0
def test_minute_friendly_message():
    assert (less_than_day(100) == "a minute ago")
Ejemplo n.º 9
0
def test_secondsminute_friendly_message():
    assert (less_than_day(60) == "a minute ago")