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:
parent
08e3bc8dd8
commit
104fcb2447
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue