From 922aba3def68e57c405a0e50d353a790af85b00a Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Mon, 22 Sep 2008 00:31:22 +0000 Subject: Fixed a missing variable initialisation deep in the Query bowels. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9081 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/queries/models.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py index 49b45e83fd..2f027f8d36 100644 --- a/tests/regressiontests/queries/models.py +++ b/tests/regressiontests/queries/models.py @@ -966,6 +966,11 @@ about them and shouldn't do bad things. >>> 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 """} # In Python 2.3 and the Python 2.6 beta releases, exceptions raised in __len__ -- cgit v1.3