Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

queryset-refactor: Made on of the tests use more portable SQL to help…

… Oracle.

Patch from Ian Kelly. Fixed #7058.


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0a66eabc8ab9d11e131101c861a781810067c09e 1 parent 88488e5
Malcolm Tredinnick authored April 22, 2008
2  tests/regressiontests/queries/models.py
@@ -473,7 +473,7 @@ class Meta:
473 473
 >>> Ranking.objects.extra(tables=['django_site'], order_by=['-django_site.id', 'rank'])
474 474
 [<Ranking: 1: a3>, <Ranking: 2: a2>, <Ranking: 3: a1>]
475 475
 
476  
->>> qs = Ranking.objects.extra(select={'good': 'rank > 2'})
  476
+>>> qs = Ranking.objects.extra(select={'good': 'case when rank > 2 then 1 else 0 end'})
477 477
 >>> [o.good for o in qs.extra(order_by=('-good',))] == [True, False, False]
478 478
 True
479 479
 >>> qs.extra(order_by=('-good', 'id'))

0 notes on commit 0a66eab

Please sign in to comment.
Something went wrong with that request. Please try again.