From 4e8ccb3274069832f66ff5b28ea36ebf2aa7e488 Mon Sep 17 00:00:00 2001 From: Alex Hill Date: Sun, 24 Jul 2016 22:00:39 +0800 Subject: [1.10.x] Fixed #26945 -- Ensured that i18n_patterns returns a list Backport of 971120778a7e7b7ebc2fc48275cca20a87580efe from master --- tests/i18n/tests.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py index 07203b341e..e1dad91cc1 100644 --- a/tests/i18n/tests.py +++ b/tests/i18n/tests.py @@ -1512,6 +1512,12 @@ class MiscTests(SimpleTestCase): with self.settings(LANGUAGES=[('en', 'English')]): self.assertNotEqual('pt-br', g(r)) + def test_i18n_patterns_returns_list(self): + with override_settings(USE_I18N=False): + self.assertIsInstance(i18n_patterns([]), list) + with override_settings(USE_I18N=True): + self.assertIsInstance(i18n_patterns([]), list) + class ResolutionOrderI18NTests(SimpleTestCase): -- cgit v1.3