summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2011-09-22 15:04:27 +0000
committerJannis Leidel <jannis@leidel.info>2011-09-22 15:04:27 +0000
commit66dc22c2d98c08a62588271507fd42bc7706541a (patch)
tree3eefd1c2a15b22a90b3bd0a362a932e705ed4fc0 /tests
parentc59339f450343960ee5dd2e2bb8d1a8507ccdaba (diff)
Fixed #16909 -- Pass language to get_format_modules when calling it from get_format to make sure the correct module is returned.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/i18n/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/regressiontests/i18n/tests.py b/tests/regressiontests/i18n/tests.py
index 3a75201372..68eafbf276 100644
--- a/tests/regressiontests/i18n/tests.py
+++ b/tests/regressiontests/i18n/tests.py
@@ -480,6 +480,11 @@ class FormattingTests(TestCase):
en_gb_format_mod = import_module('django.conf.locale.en_GB.formats')
self.assertEqual(list(iter_format_modules('en-gb')), [en_gb_format_mod, en_format_mod])
+ def test_get_format_modules_lang(self):
+ with self.settings(USE_L10N=True):
+ with translation.override('de', deactivate=True):
+ self.assertEqual('.', get_format('DECIMAL_SEPARATOR', lang='en'))
+
def test_get_format_modules_stability(self):
with self.settings(USE_L10N=True,
FORMAT_MODULE_PATH='regressiontests.i18n.other.locale'):