diff -r 41ee28cb9212 tests/regressiontests/generic_views/dates.py
a
|
b
|
|
76 | 76 | self.assertEqual(res.context['page_obj'].number, 2) |
77 | 77 | self.assertEqual(list(res.context['latest']), list(Book.objects.all()[10:20])) |
78 | 78 | |
| 79 | def test_date_list_order(self): |
| 80 | """ date_list should be ascending """ |
| 81 | self._make_books(20, base_date=datetime.date.today()) |
| 82 | res = self.client.get('/dates/books/') |
| 83 | self.assertEqual(res.context['date_list'], list(sorted(res.context['date_list']))) |
79 | 84 | |
80 | 85 | class YearArchiveViewTests(TestCase): |
81 | 86 | fixtures = ['generic-views-test-data.json'] |