diff --git a/tests/modeltests/many_to_one/models.py b/tests/modeltests/many_to_one/models.py index 3040b2177a..6b5d09b714 100644 --- a/tests/modeltests/many_to_one/models.py +++ b/tests/modeltests/many_to_one/models.py @@ -154,8 +154,13 @@ False >>> Article.objects.filter(reporter__first_name__exact='John').extra(where=["many_to_one_article__reporter.last_name='Smith'"]) [, ] +# And should work fine with the unicode that comes out of +# newforms.Form.cleaned_data +>>> Article.objects.filter(reporter__first_name__exact='John').extra(where=["many_to_one_article__reporter.last_name='%s'" % u'Smith']) +[, ] + # Find all Articles for the Reporter whose ID is 1. -# Use direct ID check, pk check, and object comparison +# Use direct ID check, pk check, and object comparison >>> Article.objects.filter(reporter__id__exact=1) [, ] >>> Article.objects.filter(reporter__pk=1)