From d0bd5330432e1dda519ebd89606bd0980a36dcb4 Mon Sep 17 00:00:00 2001 From: Sambhav Satija Date: Wed, 12 Aug 2015 06:23:26 +0530 Subject: Fixed #25254 -- Added JsonResponse json_dumps_params parameter. --- tests/httpwrappers/tests.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') 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): -- cgit v1.3