Author: aaugustin
Date: 2012-01-01 12:59:09 -0800 (Sun, 01 Jan 2012)
New Revision: 17321

Modified:
   django/trunk/tests/regressiontests/generic_views/dates.py
Log:
Fixed #17488 -- This test passed in 2011 only because 2012-01-01 is a Sunday. 
Thanks Florian Apolloner for the report and patch.


Modified: django/trunk/tests/regressiontests/generic_views/dates.py
===================================================================
--- django/trunk/tests/regressiontests/generic_views/dates.py   2012-01-01 
17:45:40 UTC (rev 17320)
+++ django/trunk/tests/regressiontests/generic_views/dates.py   2012-01-01 
20:59:09 UTC (rev 17321)
@@ -257,7 +257,8 @@
         self.assertEqual(list(res.context['book_list']), [])
 
     def test_week_view_allow_future(self):
-        future = datetime.date(datetime.date.today().year + 1, 1, 1)
+        # January 7th always falls in week 1, given Python's definition of 
week numbers
+        future = datetime.date(datetime.date.today().year + 1, 1, 7)
         b = Book.objects.create(name="The New New Testement", pages=600, 
pubdate=future)
 
         res = self.client.get('/dates/books/%s/week/1/' % future.year)

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to