Skip to content
Browse files

Fixed #9411 -- Changed the test from r9081 to be more robust across d…

…ifferent database backends.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 9319dc4 commit 3b5d975ff67cfeebc4ec8f49b7a851aa3b7401e9 @malcolmt malcolmt committed
Showing with 6 additions and 5 deletions.
  1. +6 −5 tests/regressiontests/queries/
11 tests/regressiontests/queries/
@@ -974,11 +974,12 @@ def __unicode__(self):
>>> expected == result
-Make sure bump_prefix() (an internal Query method) doesn't (re-)break.
->>> query = Tag.objects.values_list('id').order_by().query
->>> query.bump_prefix()
->>> print query.as_sql()[0]
-SELECT U0."id" FROM "queries_tag" U0
+Make sure bump_prefix() (an internal Query method) doesn't (re-)break. It's
+sufficient that this query runs without error.
+>>> qs = Tag.objects.values_list('id', flat=True).order_by('id')
+>>> qs.query.bump_prefix()
+>>> list(qs)
+[1, 2, 3, 4, 5]
Calling order_by() with no parameters removes any existing ordering on the
model. But it should still be possible to add new ordering after that.

0 comments on commit 3b5d975

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