mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #30550 -- Fixed decoding of non-UTF-8 bytes objects in response.json().
This commit is contained in:
committed by
Mariusz Felisiak
parent
498092377b
commit
d6ea4898c4
@@ -1204,6 +1204,11 @@ class RequestMethodStringDataTests(SimpleTestCase):
|
||||
response = self.client.get('/json_response/')
|
||||
self.assertEqual(response.json(), {'key': 'value'})
|
||||
|
||||
def test_json_charset(self):
|
||||
response = self.client.get('/json_response_latin1/')
|
||||
self.assertEqual(response.charset, 'latin1')
|
||||
self.assertEqual(response.json(), {'a': 'Å'})
|
||||
|
||||
def test_json_structured_suffixes(self):
|
||||
valid_types = (
|
||||
'application/vnd.api+json',
|
||||
|
||||
Reference in New Issue
Block a user