1
0
mirror of https://github.com/django/django.git synced 2025-10-27 23:56:08 +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

@@ -134,8 +134,8 @@ class ModelInheritanceTest(TestCase):
obj = Child.objects.create(
name='child',
created=datetime.datetime(2008, 6, 26, 17, 0, 0))
dates = list(Child.objects.dates('created', 'month'))
self.assertEqual(dates, [datetime.datetime(2008, 6, 1, 0, 0)])
datetimes = list(Child.objects.datetimes('created', 'month'))
self.assertEqual(datetimes, [datetime.datetime(2008, 6, 1, 0, 0)])
def test_issue_7276(self):
# Regression test for #7276: calling delete() on a model with