mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #29511 -- Added charset to JavaScriptCatalog's Content-Type header.
This commit is contained in:
committed by
Carlton Gibson
parent
ae38777698
commit
7cdeb23ae7
@@ -206,6 +206,7 @@ class I18NViewTests(SimpleTestCase):
|
||||
catalog = gettext.translation('djangojs', locale_dir, [lang_code])
|
||||
trans_txt = catalog.gettext('this is to be translated')
|
||||
response = self.client.get('/jsi18n/')
|
||||
self.assertEqual(response['Content-Type'], 'text/javascript; charset="utf-8"')
|
||||
# response content must include a line like:
|
||||
# "this is to be translated": <value of trans_txt Python variable>
|
||||
# json.dumps() is used to be able to check unicode strings
|
||||
|
||||
Reference in New Issue
Block a user