Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.3.X] Fixed #17488 -- This test passed in 2011 only because 2012-01…

…-01 is a Sunday. Thanks Florian Apolloner for the report and patch.

Fixes #17912. Thanks Julien for the report.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@17759 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 92929d5ef4ba555e2fedf683e8223ba748963538 1 parent 1dd8848
Ramiro Morales authored
3  tests/regressiontests/generic_views/dates.py
@@ -255,7 +255,8 @@ def test_week_view_allow_empty(self):
255 255
         self.assertEqual(list(res.context['book_list']), [])
256 256
 
257 257
     def test_week_view_allow_future(self):
258  
-        future = datetime.date(datetime.date.today().year + 1, 1, 1)
  258
+        # January 7th always falls in week 1, given Python's definition of week numbers
  259
+        future = datetime.date(datetime.date.today().year + 1, 1, 7)
259 260
         b = Book.objects.create(name="The New New Testement", pages=600, pubdate=future)
260 261
 
261 262
         res = self.client.get('/dates/books/%s/week/1/' % future.year)

0 notes on commit 92929d5

Please sign in to comment.
Something went wrong with that request. Please try again.