From 104fcb2447dacf23f91c8bc510cdbcaefefa83da Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 30 Jan 2006 06:00:50 +0000 Subject: [PATCH] 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 --- tests/modeltests/many_to_one/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modeltests/many_to_one/models.py b/tests/modeltests/many_to_one/models.py index d9f05ba5a5..d2bd20f8ca 100644 --- a/tests/modeltests/many_to_one/models.py +++ b/tests/modeltests/many_to_one/models.py @@ -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.