From 352b7ffaf039b3b7b112dd60a690101ecec70cf2 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sun, 26 Jun 2011 16:51:54 +0000 Subject: Fixed #16322 -- Fixed Accept-Language parsing to allow spaces around semicolons. Thanks, Max Arnold. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16457 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/i18n/tests.py | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/regressiontests/i18n/tests.py b/tests/regressiontests/i18n/tests.py index 9c24c3fb40..0b955ad3da 100644 --- a/tests/regressiontests/i18n/tests.py +++ b/tests/regressiontests/i18n/tests.py @@ -516,6 +516,7 @@ class MiscTests(TestCase): self.assertEqual([('de', 1.0), ('en-au', 0.75), ('en-us', 0.5), ('en', 0.25), ('es', 0.125), ('fa', 0.125)], p('de,en-au;q=0.75,en-us;q=0.5,en;q=0.25,es;q=0.125,fa;q=0.125')) self.assertEqual([('*', 1.0)], p('*')) self.assertEqual([('de', 1.0)], p('de;q=0.')) + self.assertEqual([('en', 1.0), ('*', 0.5)], p('en; q=1.0, * ; q=0.5')) self.assertEqual([], p('')) # Bad headers; should always return []. -- cgit v1.3