summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorpartizan <serg.partizan@gmail.com>2017-06-05 21:43:40 +0300
committerTim Graham <timograham@gmail.com>2017-06-05 14:43:40 -0400
commitff099f9db8fc88966904035d37b1431af4ad35fd (patch)
tree1d10da153c49aae9ef2c6cea86b2057389ed2fdc /tests
parent6352d06cd04e151c2ee984eb0bdaa7e8d6824235 (diff)
Fixed #28271 -- Added charset to technical_500_response() AJAX response.
Diffstat (limited to 'tests')
-rw-r--r--tests/view_tests/tests/test_debug.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py
index 746d6cab8f..a89507269a 100644
--- a/tests/view_tests/tests/test_debug.py
+++ b/tests/view_tests/tests/test_debug.py
@@ -1079,6 +1079,11 @@ class AjaxResponseExceptionReporterFilter(ExceptionReportTestMixin, LoggingCaptu
with self.settings(DEBUG=False):
self.verify_unsafe_response(custom_exception_reporter_filter_view, check_for_vars=False)
+ @override_settings(DEBUG=True, ROOT_URLCONF='view_tests.urls')
+ def test_ajax_response_encoding(self):
+ response = self.client.get('/raises500/', HTTP_X_REQUESTED_WITH='XMLHttpRequest')
+ self.assertEqual(response['Content-Type'], 'text/plain; charset=utf-8')
+
class HelperFunctionTests(SimpleTestCase):