mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #2675 -- Changed the timeuntil
and timesince
template filters to display "0 minutes" when passed a past or future date respectively instead of "-1 years, 12 months". Thanks to nickefford for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
771481695f
commit
66203fc9ee
5 changed files with 115 additions and 4 deletions
|
@ -6,6 +6,8 @@ from unittest import TestCase
|
|||
|
||||
from django.utils import html
|
||||
|
||||
from timesince import timesince_tests
|
||||
|
||||
class TestUtilsHtml(TestCase):
|
||||
|
||||
def check_output(self, function, value, output=None):
|
||||
|
@ -113,3 +115,11 @@ class TestUtilsHtml(TestCase):
|
|||
)
|
||||
for value, output in items:
|
||||
self.check_output(f, value, output)
|
||||
|
||||
__test__ = {
|
||||
'timesince_tests': timesince_tests,
|
||||
}
|
||||
|
||||
if __name__ == "__main__":
|
||||
import doctest
|
||||
doctest.testmod()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue