From c2c585f0f0785b71d2efbe6de8b95ff994e59601 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Tue, 22 May 2007 00:46:08 +0000 Subject: [PATCH] unicode: Added a note about some tests that fail for MySQL. Changed the test data slightly so that it will even fit into a server who's default encoding is latin1, but still no luck. :-( git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5312 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/string_lookup/models.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/regressiontests/string_lookup/models.py b/tests/regressiontests/string_lookup/models.py index 8654352480..66651ce680 100644 --- a/tests/regressiontests/string_lookup/models.py +++ b/tests/regressiontests/string_lookup/models.py @@ -3,7 +3,7 @@ from django.db import models class Foo(models.Model): name = models.CharField(maxlength=50) - viking = models.CharField(maxlength=50, blank=True) + friend = models.CharField(maxlength=50, blank=True) def __unicode__(self): return "Foo %s" % self.name @@ -71,13 +71,15 @@ __test__ = {'API_TESTS': ur""" # Regression tests for #3937: make sure we can use unicode characters in # queries. +# BUG: These tests fail on MySQL, but it's a problem with the test setup. A +# properly configured UTF-8 database can handle this. ->>> fx = Foo(name='Bjorn', viking=u'Freydís Eiríksdóttir') +>>> fx = Foo(name='Bjorn', friend=u'François') >>> fx.save() ->>> Foo.objects.get(viking__contains=u'\xf3') +>>> Foo.objects.get(friend__contains=u'\xe7') # We can also do the above query using UTF-8 strings. ->>> Foo.objects.get(viking__contains='\xc3\xb3') +>>> Foo.objects.get(friend__contains='\xc3\xa7') """}