From 08e3bc8dd80d3c2d761dcdc0f99614379d5cba10 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 30 Jan 2006 05:57:30 +0000 Subject: [PATCH] magic-removal: Fixed bug in many_to_one unit test git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2183 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/many_to_one/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/modeltests/many_to_one/models.py b/tests/modeltests/many_to_one/models.py index 80fa045486..d9f05ba5a5 100644 --- a/tests/modeltests/many_to_one/models.py +++ b/tests/modeltests/many_to_one/models.py @@ -93,7 +93,8 @@ This is a test [This is a test, John's second story] # The underlying query only makes one join when a related table is referenced twice. ->>> null, sql, null = Article.objects._get_sql_clause(True, reporter__first_name__exact='John', reporter__last_name__exact='Smith') +>>> query = Article.objects.filter(reporter__first_name__exact='John', reporter__last_name__exact='Smith') +>>> null, sql, null = query._get_sql_clause(True) >>> sql.count('INNER JOIN') 1