예제 #1
0
 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')
예제 #2
0
파일: test_helpers.py 프로젝트: abetam/ckan
 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")
예제 #3
0
 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')
예제 #4
0
 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"