Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #12125 -- Fixed a typo in the generic views date_based test tha…

…t 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
  • Loading branch information...
commit ff38e0b1d1edabbb167d2e65ef23c8a2e5c6faea 1 parent e18af06
Karen Tracey kmtracey authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/regressiontests/views/tests/generic/date_based.py
4 tests/regressiontests/views/tests/generic/date_based.py
View
@@ -100,7 +100,7 @@ def test_archive_month_includes_only_month(self):
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 @@ def test_year_month_day_format(self):
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)
+ self.assertEqual(response.context['object_list'][0], article)
Please sign in to comment.
Something went wrong with that request. Please try again.