示例#1
0
def test_humanize_time(inp, expected):
    # flexmock(datetime, now=datetime(year=2000, month=1, day=1))
    n = datetime.now()
    assert humanize_time(n - inp) == expected
示例#2
0
 def display_time_created(self):
     return humanize_time(self.created)
示例#3
0
 def display_time_created(self):
     return humanize_time(self.created)
示例#4
0
def test_humanize_time(inp, expected):
    # flexmock(datetime, now=datetime(year=2000, month=1, day=1))
    n = datetime.now()
    assert humanize_time(n - inp) == expected