diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-11-19 04:35:53 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-11-19 04:35:53 +0000 |
| commit | 77755aa5a03ec7295d17149590829544aba71377 (patch) | |
| tree | 4d81e7498d547f9b46992fe8e031d0f6dcac2b2c /tests | |
| parent | 7875421a03a5af3006152216215fc3a9a9b8b274 (diff) | |
Fixed #12242 -- Corrected a problem with masking extra selects() in a DateQuerySet. Thanks to Alex Gaynor for his help debugging this one.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/queries/models.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py index cf21d5210b..ddac509ede 100644 --- a/tests/regressiontests/queries/models.py +++ b/tests/regressiontests/queries/models.py @@ -755,10 +755,20 @@ Bug #6180, #6203 -- dates with limits and/or counts >>> Item.objects.dates('created', 'day')[0] datetime.datetime(2007, 12, 19, 0, 0) -Bug #7087 -- dates with extra select columns +Bug #7087/#12242 -- dates with extra select columns >>> Item.objects.dates('created', 'day').extra(select={'a': 1}) [datetime.datetime(2007, 12, 19, 0, 0), datetime.datetime(2007, 12, 20, 0, 0)] +>>> Item.objects.extra(select={'a': 1}).dates('created', 'day') +[datetime.datetime(2007, 12, 19, 0, 0), datetime.datetime(2007, 12, 20, 0, 0)] + +>>> name="one" +>>> Item.objects.dates('created', 'day').extra(where=['name=%s'], params=[name]) +[datetime.datetime(2007, 12, 19, 0, 0)] + +>>> Item.objects.extra(where=['name=%s'], params=[name]).dates('created', 'day') +[datetime.datetime(2007, 12, 19, 0, 0)] + Bug #7155 -- nullable dates >>> Item.objects.dates('modified', 'day') [datetime.datetime(2007, 12, 19, 0, 0)] |
