summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-10-15 00:29:55 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-10-15 00:29:55 +0000
commit05ebc901fef3e8982db320d269357bf9096f3ead (patch)
tree974ca2b8cf2bf451b85562c7564da2d6eea08290 /tests
parent201c15dcb62543ea66ff66858be088340ed50221 (diff)
queryset-refactor: Fixed a couple of typos that were messing up extra(select=...).
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/queries/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py
index d47792ecaa..3a80e2da61 100644
--- a/tests/regressiontests/queries/models.py
+++ b/tests/regressiontests/queries/models.py
@@ -310,6 +310,12 @@ Bug #2076
>>> Ranking.objects.extra(tables=['django_site'], order_by=['-django_site.id', 'rank'])
[<Ranking: 1: a3>, <Ranking: 2: a2>, <Ranking: 3: a1>]
+>>> qs = Ranking.objects.extra(select={'good': 'rank > 2'})
+>>> [o.good for o in qs.extra(order_by=('-good',))] == [True, False, False]
+True
+>>> qs.extra(order_by=('-good', 'id'))
+[<Ranking: 3: a1>, <Ranking: 2: a2>, <Ranking: 1: a3>]
+
Bugs #2874, #3002
>>> qs = Item.objects.select_related().order_by('note__note', 'name')
>>> list(qs)