summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-06-22 03:15:29 -0400
committerCarlton Gibson <carlton.gibson@noumenal.es>2018-06-22 09:32:33 +0200
commit714612a638ff02f02406553a583b2f8a1a424885 (patch)
tree5afd24d13919b50877421c0cb707412f39b72481 /tests
parentea75f8abca851ed4b6f3764a9d1af95e215208f0 (diff)
[2.1.x] Fixed #29511 -- Added charset to JavaScriptCatalog's Content-Type header.
Backport of 7cdeb23ae7ef2d125276840ff298dbb9683959f2 from master
Diffstat (limited to 'tests')
-rw-r--r--tests/view_tests/tests/test_i18n.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/view_tests/tests/test_i18n.py b/tests/view_tests/tests/test_i18n.py
index 125d6e0a5f..5baa755580 100644
--- a/tests/view_tests/tests/test_i18n.py
+++ b/tests/view_tests/tests/test_i18n.py
@@ -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