Author: mtredinnick
Date: 2008-10-24 01:24:04 -0500 (Fri, 24 Oct 2008)
New Revision: 9254

Modified:
   django/trunk/tests/regressiontests/queries/models.py
Log:
Fixed #9411 -- Changed the test from r9081 to be more robust across different 
database backends.


Modified: django/trunk/tests/regressiontests/queries/models.py
===================================================================
--- django/trunk/tests/regressiontests/queries/models.py        2008-10-24 
06:15:54 UTC (rev 9253)
+++ django/trunk/tests/regressiontests/queries/models.py        2008-10-24 
06:24:04 UTC (rev 9254)
@@ -974,11 +974,12 @@
 >>> expected == result
 True
 
-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.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to