def test_pretty_json(self):
        user = UserFactory()
        self.client.login(username=user.username, password='asfa')
        normal_content = self.get_content('/simple_json/')
        self.view_class.json_dumps_kwargs = {'indent': 2}
        pretty_content = self.get_content('/simple_json/')
        normal_json = json.loads('{0}'.format(normal_content))
        pretty_json = json.loads('{0}'.format(pretty_content))
        self.assertEqual(normal_json, pretty_json)
        self.assertTrue(len(pretty_content) > len(normal_content))
Success if JSON responses are the same, and the well-indented response
dataset/ETHPy150Open brack3t/django-braces/tests/test_ajax_mixins.py/TestJSONResponseMixin.test_pretty_json