Author: julien Date: 2011-11-11 04:25:53 -0800 (Fri, 11 Nov 2011) New Revision: 17080
Modified: django/trunk/tests/regressiontests/views/tests/i18n.py Log: Fixed #17197 -- Prevented a locale leakage from an i18n test causing collateral failures in the rest of the test suite. Thanks to Florian Apolloner for the report and patch. Modified: django/trunk/tests/regressiontests/views/tests/i18n.py =================================================================== --- django/trunk/tests/regressiontests/views/tests/i18n.py 2011-11-10 08:41:21 UTC (rev 17079) +++ django/trunk/tests/regressiontests/views/tests/i18n.py 2011-11-11 12:25:53 UTC (rev 17080) @@ -6,7 +6,7 @@ from django.conf import settings from django.test import TestCase -from django.utils.translation import override, activate +from django.utils.translation import override, activate, get_language from django.utils.text import javascript_quote from ..urls import locale_dir @@ -25,6 +25,7 @@ def test_jsi18n(self): """The javascript_catalog can be deployed with language settings""" + saved_lang = get_language() for lang_code in ['es', 'fr', 'ru']: activate(lang_code) catalog = gettext.translation('djangojs', locale_dir, [lang_code]) @@ -37,6 +38,7 @@ if lang_code == 'fr': # Message with context (msgctxt) self.assertContains(response, "['month name\x04May'] = 'mai';", 1) + activate(saved_lang) class JsI18NTests(TestCase): -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.