summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
authorSaJH <wogur981208@gmail.com>2024-10-16 01:11:46 +0900
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-10-16 11:52:22 +0200
commit0c8177551500e960d2dc04bc4b0fa7060f9172ae (patch)
tree1453b4739431a2efeebd2d2db4f9141e1d064769 /django/test
parent4a685bc0dca5298a7d5a4e162120a90cac7fd1a4 (diff)
Refs #35727 -- Updated response.content.decode calls to use the HttpResponse.text property.
Signed-off-by: SaJH <wogur981208@gmail.com>
Diffstat (limited to 'django/test')
-rw-r--r--django/test/client.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/django/test/client.py b/django/test/client.py
index a755aae05c..85d91b0c44 100644
--- a/django/test/client.py
+++ b/django/test/client.py
@@ -947,9 +947,7 @@ class ClientMixin:
'Content-Type header is "%s", not "application/json"'
% response.get("Content-Type")
)
- response._json = json.loads(
- response.content.decode(response.charset), **extra
- )
+ response._json = json.loads(response.text, **extra)
return response._json
def _follow_redirect(