summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/httpwrappers/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py
index 74a8f923cf..9ccd66ddf0 100644
--- a/tests/httpwrappers/tests.py
+++ b/tests/httpwrappers/tests.py
@@ -504,6 +504,10 @@ class JsonResponseTests(SimpleTestCase):
response = JsonResponse({}, encoder=CustomDjangoJSONEncoder)
self.assertEqual(json.loads(response.content.decode()), {'foo': 'bar'})
+ def test_json_response_passing_arguments_to_json_dumps(self):
+ response = JsonResponse({'foo': 'bar'}, json_dumps_params={'indent': 2})
+ self.assertEqual(response.content.decode(), '{\n "foo": "bar"\n}')
+
class StreamingHttpResponseTests(SimpleTestCase):
def test_streaming_response(self):