Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 authored November 01, 2009
4  tests/regressiontests/views/tests/generic/date_based.py
@@ -100,7 +100,7 @@ def test_archive_month_includes_only_month(self):
100 100
 
101 101
         now = datetime.now()
102 102
         prev_month = now.date().replace(day=1)
103  
-        if prev_month.month == 11:
  103
+        if prev_month.month == 1:
104 104
             prev_month = prev_month.replace(year=prev_month.year-1, month=12)
105 105
         else:
106 106
             prev_month = prev_month.replace(month=prev_month.month-1)
@@ -121,4 +121,4 @@ def test_year_month_day_format(self):
121 121
         article = Article.objects.create(title="example", author=author, date_created=datetime(2004, 1, 21, 0, 0, 1))
122 122
         response = self.client.get('/views/date_based/archive_day/2004/1/21/')
123 123
         self.assertEqual(response.status_code, 200)
124  
-        self.assertEqual(response.context['object_list'][0], article)
  124
+        self.assertEqual(response.context['object_list'][0], article)

0 notes on commit ff38e0b

Please sign in to comment.
Something went wrong with that request. Please try again.