Fixed #15048 -- Modified a test case to avoid a known bug in Python 2.4's time library. Thanks to Łukasz Rekucki for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d7fa33af78
commit
da524c56e1
|
@ -221,10 +221,10 @@ class WeekArchiveViewTests(TestCase):
|
|||
future = datetime.date(datetime.date.today().year + 1, 1, 1)
|
||||
b = Book.objects.create(name="The New New Testement", pages=600, pubdate=future)
|
||||
|
||||
res = self.client.get('/dates/books/%s/week/0/' % future.year)
|
||||
res = self.client.get('/dates/books/%s/week/1/' % future.year)
|
||||
self.assertEqual(res.status_code, 404)
|
||||
|
||||
res = self.client.get('/dates/books/%s/week/0/allow_future/' % future.year)
|
||||
res = self.client.get('/dates/books/%s/week/1/allow_future/' % future.year)
|
||||
self.assertEqual(res.status_code, 200)
|
||||
self.assertEqual(list(res.context['books']), [b])
|
||||
|
||||
|
|
Loading…
Reference in New Issue