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
This commit is contained in:
Adrian Holovaty 2006-01-30 05:57:30 +00:00
parent 13cea53bb2
commit 08e3bc8dd8
1 changed files with 2 additions and 1 deletions

View File

@ -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