Fixed #32080 -- Fixed displaying Unicode chars in forms.JSONField and read-only JSONField values in admin.

This commit is contained in:
Qi Zhao 2020-10-08 21:51:14 +08:00 committed by Mariusz Felisiak
parent b790883065
commit de81676b51
6 changed files with 16 additions and 2 deletions

View file

@ -186,6 +186,7 @@ class UtilsTests(SimpleTestCase):
({'a': {'b': 'c'}}, '{"a": {"b": "c"}}'),
(['a', 'b'], '["a", "b"]'),
('a', '"a"'),
({'a': '你好 世界'}, '{"a": "你好 世界"}'),
({('a', 'b'): 'c'}, "{('a', 'b'): 'c'}"), # Invalid JSON.
]
for value, display_value in tests: