def test_time_ago_in_words_from_str(self): two_months_ago = datetime.datetime.now() - datetime.timedelta(days=65) two_months_ago_str = h.datetime_to_date_str(two_months_ago) res = h.time_ago_in_words_from_str(two_months_ago_str) assert_equal(res, '2 months')
def test_time_ago_in_words_from_str(self): two_months_ago = datetime.datetime.now() - datetime.timedelta(days=65) two_months_ago_str = two_months_ago.isoformat() res = h.time_ago_in_words_from_str(two_months_ago_str) assert_equal(res, "2 months")
def test_time_ago_in_words_from_str(self): two_months_ago = datetime.datetime.now() - datetime.timedelta(days=65) two_months_ago_str = two_months_ago.isoformat() res = h.time_ago_in_words_from_str(two_months_ago_str) assert res == "2 months ago"