def test_timesince_or_never_returns_same_output_as_django_date(self):
d = datetime.date(year=2014, month=3, day=7)
c = django.template.Context({'date': d})
t = django.template.Template('{{ date|timesince_or_never }}')
self.assertEqual(defaultfilters.timesince(d), t.render(c))
评论列表
文章目录