mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #34455 -- Restored i18n_patterns() respect of prefix_default_language argument when fallback language is used.
Regression in 94e7f471c4.
Thanks Oussama Jarrousse for the report.
This commit is contained in:
committed by
Mariusz Felisiak
parent
2eb1f37260
commit
3b4728310a
@@ -1916,6 +1916,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")
|
||||
|
||||
Reference in New Issue
Block a user