Skip to content
Browse files

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.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 64fdd84 commit 9d410ee64b1a0f2d8a714eeffa7e17e09965f01c @jphalip jphalip committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/regressiontests/views/tests/
4 tests/regressiontests/views/tests/
@@ -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_setlang(self):
def test_jsi18n(self):
"""The javascript_catalog can be deployed with language settings"""
+ saved_lang = get_language()
for lang_code in ['es', 'fr', 'ru']:
catalog = gettext.translation('djangojs', locale_dir, [lang_code])
@@ -37,6 +38,7 @@ def test_jsi18n(self):
if lang_code == 'fr':
# Message with context (msgctxt)
self.assertContains(response, "['month name\x04May'] = 'mai';", 1)
+ activate(saved_lang)
class JsI18NTests(TestCase):

0 comments on commit 9d410ee

Please sign in to comment.
Something went wrong with that request. Please try again.