diff --git a/tests/regressiontests/views/tests/generic/date_based.py b/tests/regressiontests/views/tests/generic/date_based.py index e0bae28ed0..2ca1bfd090 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)