Ticket #13944: 13944-tests.diff

File 13944-tests.diff, 960 bytes (added by Ramiro Morales, 9 years ago)
  • tests/regressiontests/i18n/tests.py

    diff -r 731b9d6d9c9a tests/regressiontests/i18n/tests.py
    a b  
    460460        self.assertEqual([], p('de;q=2.0'))
    461461        self.assertEqual([], p('de;q=0.a'))
    462462        self.assertEqual([], p(''))
     463        # ticket 13944
     464        self.assertEqual([], p('en-nz,en,de,chrome://global/locale/intl.properties'))
    463465
    464466    def test_parse_literal_http_header(self):
    465467        """
     
    503505        r.META = {'HTTP_ACCEPT_LANGUAGE': 'zh-cn,de'}
    504506        self.assertEqual(g(r), 'zh-cn')
    505507
     508        # ticket 13944
     509        r.META = {'HTTP_ACCEPT_LANGUAGE': 'en-nz,en,de,chrome://global/locale/intl.properties'}
     510        self.assertEqual(g(r), settings.LANGUAGE_CODE)
     511
    506512    def test_parse_language_cookie(self):
    507513        """
    508514        Now test that we parse language preferences stored in a cookie correctly.
Back to Top