1
0
mirror of https://github.com/django/django.git synced 2025-10-31 01:25:32 +00:00

Updated tests of .dates().

Replaced .dates() by .datetimes() for DateTimeFields.
Replaced dates with datetimes in the expected output for DateFields.
This commit is contained in:
Aymeric Augustin
2013-02-10 23:07:41 +01:00
parent 50fb7a5246
commit c01bbb3235
11 changed files with 69 additions and 68 deletions

View File

@@ -144,7 +144,7 @@ class DateQuotingTest(TestCase):
updated = datetime.datetime(2010, 2, 20)
models.SchoolClass.objects.create(year=2009, last_updated=updated)
years = models.SchoolClass.objects.dates('last_updated', 'year')
self.assertEqual(list(years), [datetime.datetime(2010, 1, 1, 0, 0)])
self.assertEqual(list(years), [datetime.date(2010, 1, 1)])
def test_django_date_extract(self):
"""