From ff38e0b1d1edabbb167d2e65ef23c8a2e5c6faea Mon Sep 17 00:00:00 2001 From: Karen Tracey Date: Sun, 1 Nov 2009 22:12:40 +0000 Subject: [PATCH] Fixed #12125 -- Fixed a typo in the generic views date_based test that caused it to fail in November. Thanks brutasse. --This line and those below, will be ignored-- M tests/regressiontests/views/tests/generic/date_based.py git-svn-id: http://code.djangoproject.com/svn/django/trunk@11697 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/views/tests/generic/date_based.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/regressiontests/views/tests/generic/date_based.py b/tests/regressiontests/views/tests/generic/date_based.py index e0bae28ed07..2ca1bfd090f 100644 --- a/tests/regressiontests/views/tests/generic/date_based.py +++ b/tests/regressiontests/views/tests/generic/date_based.py @@ -100,7 +100,7 @@ class MonthArchiveTest(TestCase): 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) @@ -121,4 +121,4 @@ class DayArchiveTests(TestCase): article = Article.objects.create(title="example", author=author, date_created=datetime(2004, 1, 21, 0, 0, 1)) response = self.client.get('/views/date_based/archive_day/2004/1/21/') self.assertEqual(response.status_code, 200) - self.assertEqual(response.context['object_list'][0], article) \ No newline at end of file + self.assertEqual(response.context['object_list'][0], article)