From 6104f6bd856a36e41352d3b90e7a550ef276daab Mon Sep 17 00:00:00 2001 From: Joseph Kocherhans Date: Sat, 6 Oct 2007 22:34:48 +0000 Subject: newforms-admin: Merged to [6458] git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6459 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/i18n/models.py | 12 ++++++++++++ tests/regressiontests/i18n/tests.py | 8 ++++++++ 2 files changed, 20 insertions(+) (limited to 'tests/regressiontests') diff --git a/tests/regressiontests/i18n/models.py b/tests/regressiontests/i18n/models.py index e69de29bb2..e1eefb8477 100644 --- a/tests/regressiontests/i18n/models.py +++ b/tests/regressiontests/i18n/models.py @@ -0,0 +1,12 @@ +from django.db import models +from django.utils.translation import ugettext_lazy as _ + +class TestModel(models.Model): + text = models.CharField(max_length=10, default=_('Anything')) + +__test__ = {'API_TESTS': ''' +>>> tm = TestModel() +>>> tm.save() +''' +} + diff --git a/tests/regressiontests/i18n/tests.py b/tests/regressiontests/i18n/tests.py index 8a7d2bee3e..99204451e4 100644 --- a/tests/regressiontests/i18n/tests.py +++ b/tests/regressiontests/i18n/tests.py @@ -30,4 +30,12 @@ True >>> s4 = ugettext_lazy('Some other string') >>> s == s4 False + +unicode(string_concat(...)) should not raise a TypeError - #4796 + +>>> import django.utils.translation +>>> reload(django.utils.translation) + +>>> unicode(django.utils.translation.string_concat("dja", "ngo")) +u'django' """ -- cgit v1.3