Beispiel #1
0
 def test_trunc(self):
     """Assert it returns only the most significant time division."""
     eq_('1 year ago',
         utctimesince(datetime(2000, 1, 2), now=datetime(2001, 2, 3)))
Beispiel #2
0
 def test_future(self):
     """Test future date and omitting "now" kwarg"""
     eq_('', utctimesince(datetime(9999, 1, 2)))
Beispiel #3
0
 def test_none(self):
     """If None is passed in, utctimesince returns ''."""
     eq_('', utctimesince(None))