diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-05-22 00:46:08 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-05-22 00:46:08 +0000 |
| commit | c2c585f0f0785b71d2efbe6de8b95ff994e59601 (patch) | |
| tree | c6cdcd14c0bcc0a34db43fbb7afeab4f64824621 /tests | |
| parent | 6f23be4ee9f0b333a7ee2faf0d5fc78f7c70b86e (diff) | |
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
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/string_lookup/models.py | 10 |
1 files 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') <Foo: Foo Bjorn> # 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') <Foo: Foo Bjorn> """} |
