Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.1.X] (In [11697]) Fixed #12125 -- Fixed a typo in the generic view…

…s date_based test that caused it to fail in November. Thanks brutasse.

r11697 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@11698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8061665c2785a10c26f4dd770a02d89cb8c49c68 1 parent e109de3
@kmtracey kmtracey authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/regressiontests/views/tests/generic/date_based.py
View
4 tests/regressiontests/views/tests/generic/date_based.py
@@ -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.