summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-07-05 10:27:22 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-07-05 10:27:22 +0000
commitd0b627acc2e9553b09cab3435258bcef044728ae (patch)
tree82c31ae46d91c2a80af7cd8ad140bc9b4fcd58c2
parentd2c45bacd25eaacbcb0e2970d22edd4580cc4f25 (diff)
Added a test that shows the problem in #4470. This fails only for the mysql_old
backend. Refs #4470. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5617 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/modeltests/basic/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/modeltests/basic/models.py b/tests/modeltests/basic/models.py
index e4fcaf0312..81656cf2df 100644
--- a/tests/modeltests/basic/models.py
+++ b/tests/modeltests/basic/models.py
@@ -365,4 +365,10 @@ year, including Jan. 1 and Dec. 31.
>>> a12 = Article.objects.create(headline='Article 12', pub_date=datetime(2008, 12, 31, 23, 59, 59, 999999))
>>> Article.objects.filter(pub_date__year=2008)
[<Article: Article 11>, <Article: Article 12>]
+
+# Unicode data works, too.
+>>> a = Article(headline=u'\u6797\u539f \u3081\u3050\u307f', pub_date=datetime(2005, 7, 28))
+>>> a.save()
+>>> Article.objects.get(pk=a.id).headline
+u'\u6797\u539f \u3081\u3050\u307f'
"""