magic-removal: Fixed bugs in many_to_one unit tests

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2184 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-01-30 06:00:50 +00:00
parent 08e3bc8dd8
commit 104fcb2447
1 changed files with 2 additions and 2 deletions

View File

@ -154,13 +154,13 @@ John Smith
[John Smith]
>>> list(Reporter.objects.filter(article__headline__startswith='This'))
[John Smith, John Smith, John Smith]
>>> list(Reporter.objects.filter(article__headline__startswith='This', distinct=True))
>>> list(Reporter.objects.filter(article__headline__startswith='This').distinct())
[John Smith]
# Queries can go round in circles.
>>> list(Reporter.objects.filter(article__reporter__first_name__startswith='John'))
[John Smith, John Smith, John Smith, John Smith]
>>> list(Reporter.objects.filter(article__reporter__first_name__startswith='John', distinct=True))
>>> list(Reporter.objects.filter(article__reporter__first_name__startswith='John').distinct())
[John Smith]
# Deletes that require joins are prohibited.