From 6c5933d1753f223f69dab4b2c6665d7628da349c Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Thu, 29 Mar 2012 15:11:14 +0000 Subject: [PATCH] [1.4.X] Make auth test pass even when LANGUAGE_CODE is not 'en'. Refs #17980. Thanks wassup for the report. Backport of r17811 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.4.X@17819 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/auth/tests/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/contrib/auth/tests/forms.py b/django/contrib/auth/tests/forms.py index 2397b52aff..3c890d4c8a 100644 --- a/django/contrib/auth/tests/forms.py +++ b/django/contrib/auth/tests/forms.py @@ -9,6 +9,7 @@ from django.test import TestCase from django.test.utils import override_settings from django.utils.encoding import force_unicode from django.utils import translation +from django.utils.translation import ugettext as _ class UserCreationFormTest(TestCase): @@ -333,6 +334,6 @@ class PasswordResetFormTest(TestCase): form = PasswordResetForm(data) self.assertFalse(form.is_valid()) self.assertEqual(form["email"].errors, - [u"The user account associated with this e-mail address cannot reset the password."]) + [_(u"The user account associated with this e-mail address cannot reset the password.")]) PasswordResetFormTest = override_settings(USE_TZ=False)(PasswordResetFormTest)