Author: mtredinnick
Date: 2007-05-14 16:58:01 -0500 (Mon, 14 May 2007)
New Revision: 5243

Modified:
   django/branches/unicode/tests/modeltests/many_to_one/models.py
Log:
unicode: Added test to verify fix of #3492.


Modified: django/branches/unicode/tests/modeltests/many_to_one/models.py
===================================================================
--- django/branches/unicode/tests/modeltests/many_to_one/models.py      
2007-05-14 21:50:38 UTC (rev 5242)
+++ django/branches/unicode/tests/modeltests/many_to_one/models.py      
2007-05-14 21:58:01 UTC (rev 5243)
@@ -154,8 +154,13 @@
 >>> Article.objects.filter(reporter__first_name__exact='John').extra(where=["many_to_one_article__reporter.last_name='Smith'"])
 [<Article: John's second story>, <Article: This is a test>]
 
+# 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'])
+[<Article: John's second story>, <Article: This is a test>]
+
 # 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: John's second story>, <Article: This is a test>]
 >>> Article.objects.filter(reporter__pk=1)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to