From b46e736c9ae2d16e4743e783d03954b1424bbf2b Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Mon, 25 Aug 2008 20:47:42 +0000 Subject: [PATCH] Because the filter tests take non-zero time to pass, it's possible for one of the timeuntil tests to fail because the pre-recorded "now" has moved on sufficiently far from actual "now()". Fixed the one test that was failing for me (the other timeuntil and timesince tests already have a small buffer built in to guard against this problem). The problem was revealed after [8535]. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8556 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/templates/filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/regressiontests/templates/filters.py b/tests/regressiontests/templates/filters.py index 5dbb8e7e23..c71270c9ea 100644 --- a/tests/regressiontests/templates/filters.py +++ b/tests/regressiontests/templates/filters.py @@ -58,7 +58,7 @@ def get_filter_tests(): # Regression for #7443 'filter-timeuntil06': ('{{ earlier|timeuntil }}', { 'earlier': now - timedelta(days=7) }, '0 minutes'), 'filter-timeuntil07': ('{{ earlier|timeuntil:now }}', { 'now': now, 'earlier': now - timedelta(days=7) }, '0 minutes'), - 'filter-timeuntil08': ('{{ later|timeuntil }}', { 'later': now + timedelta(days=7) }, '1 week'), + 'filter-timeuntil08': ('{{ later|timeuntil }}', { 'later': now + timedelta(days=7, hours=1) }, '1 week'), 'filter-timeuntil09': ('{{ later|timeuntil:now }}', { 'now': now, 'later': now + timedelta(days=7) }, '1 week'),