Kaydet (Commit) 3b5d975f authored tarafından Malcolm Tredinnick's avatar Malcolm Tredinnick

Fixed #9411 -- Changed the test from r9081 to be more robust across different database backends.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 9319dc49
...@@ -974,11 +974,12 @@ about them and shouldn't do bad things. ...@@ -974,11 +974,12 @@ about them and shouldn't do bad things.
>>> expected == result >>> expected == result
True True
Make sure bump_prefix() (an internal Query method) doesn't (re-)break. Make sure bump_prefix() (an internal Query method) doesn't (re-)break. It's
>>> query = Tag.objects.values_list('id').order_by().query sufficient that this query runs without error.
>>> query.bump_prefix() >>> qs = Tag.objects.values_list('id', flat=True).order_by('id')
>>> print query.as_sql()[0] >>> qs.query.bump_prefix()
SELECT U0."id" FROM "queries_tag" U0 >>> list(qs)
[1, 2, 3, 4, 5]
Calling order_by() with no parameters removes any existing ordering on the 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. model. But it should still be possible to add new ordering after that.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment