tags 555931 + confirmed patch thanks * Daniel Schepler <dschep...@gmail.com>, 2009-11-12, 10:35:
====================================================================== FAIL: Regression for #3031: Archives around Feburary include only one month ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/buildd/python-django-1.1.1/tests/regressiontests/views/tests/generic/date_based.py", line 112, in test_archive_month_includes_only_month self.assertEqual(response.context['previous_month'], prev_month) AssertionError: datetime.date(2009, 10, 1) != datetime.date(2008, 12, 1)----------------------------------------------------------------------
Funnily enough, it fails only in November. See the attached patch. -- Jakub Wilk
diff --git a/tests/regressiontests/views/tests/generic/date_based.py b/tests/regressiontests/views/tests/generic/date_based.py --- a/tests/regressiontests/views/tests/generic/date_based.py +++ b/tests/regressiontests/views/tests/generic/date_based.py @@ -100,7 +100,7 @@ now = datetime.now() prev_month = now.date().replace(day=1) - if prev_month.month == 11: + if prev_month.month == 1: prev_month = prev_month.replace(year=prev_month.year-1, month=12) else: prev_month = prev_month.replace(month=prev_month.month-1)
signature.asc
Description: Digital signature