diff options
| author | sarahboyce <sarahvboyce95@gmail.com> | 2023-04-06 19:40:14 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-04-10 15:35:28 +0200 |
| commit | facc153af7dc96ad83f1bfb86c92d41ec97aa14b (patch) | |
| tree | b6bf0d5257e9b78e62a35934a9c5d83d8d34020c /tests | |
| parent | f6e0029fcd24b476cee703ba69e153ff79b202b9 (diff) | |
[4.2.x] Fixed #34455 -- Restored i18n_patterns() respect of prefix_default_language argument when fallback language is used.
Regression in 94e7f471c4edef845a4fe5e3160132997b4cca81.
Thanks Oussama Jarrousse for the report.
Backport of 3b4728310a7a64f8fcc548163b0aa5f98a5c78f5 from main
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/i18n/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py index 43d1682c96..9ccbc25ca5 100644 --- a/tests/i18n/tests.py +++ b/tests/i18n/tests.py @@ -2132,6 +2132,12 @@ class UnprefixedDefaultLanguageTests(SimpleTestCase): response = self.client.get("/simple/") self.assertEqual(response.content, b"Yes") + @override_settings(LANGUAGE_CODE="en-us") + def test_default_lang_fallback_without_prefix(self): + response = self.client.get("/simple/") + self.assertEqual(response.status_code, 200) + self.assertEqual(response.content, b"Yes") + def test_other_lang_with_prefix(self): response = self.client.get("/fr/simple/") self.assertEqual(response.content, b"Oui") |
