summaryrefslogtreecommitdiff
path: root/django/test/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/test/client.py')
-rw-r--r--django/test/client.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/test/client.py b/django/test/client.py
index 8d46ea629a..a1ee223fdb 100644
--- a/django/test/client.py
+++ b/django/test/client.py
@@ -655,7 +655,10 @@ class Client(RequestFactory):
def _parse_json(self, response, **extra):
if 'application/json' not in response.get('Content-Type'):
- raise ValueError('Content-Type header is "{0}", not "application/json"'.format(response.get('Content-Type')))
+ raise ValueError(
+ 'Content-Type header is "{0}", not "application/json"'
+ .format(response.get('Content-Type'))
+ )
return json.loads(response.content.decode(), **extra)
def _handle_redirects(self, response, **extra):