From 14fbee6958e88b8bdee6bee58b7db1cc3f44903c Mon Sep 17 00:00:00 2001 From: Karen Tracey Date: Fri, 26 Feb 2010 16:40:37 +0000 Subject: [PATCH] [1.1.X] Added force_unicode to a test (needed for Python 2.3 compatibility). git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12607 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/forms/error_messages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/regressiontests/forms/error_messages.py b/tests/regressiontests/forms/error_messages.py index b7224dbde0..b102448cb9 100644 --- a/tests/regressiontests/forms/error_messages.py +++ b/tests/regressiontests/forms/error_messages.py @@ -362,6 +362,7 @@ ValidationError: [u'4 IS INVALID CHOICE'] # Subclassing ErrorList ####################################################### >>> from django.utils.safestring import mark_safe +>>> from django.utils.encoding import force_unicode >>> >>> class TestForm(Form): ... first_name = CharField() @@ -377,7 +378,7 @@ ValidationError: [u'4 IS INVALID CHOICE'] ... def as_divs(self): ... if not self: return u'' ... return mark_safe(u'
%s
' -... % ''.join([u'

%s

' % e for e in self])) +... % ''.join([u'

%s

' % force_unicode(e) for e in self])) ... This form should print errors the default way.