Closed masaki-takano closed 6 years ago
Thanks for contributing. Could you please also add a testcase for this change?
add test
json.dumps(v)
fail=================================== FAILURES ===================================
____________________________ test_data_ensure_ascii ____________________________
opt/resource-tests/test_invocation.py:127: in test_data_ensure_ascii
assert output['form'] == {'field': '{"test": "日本語"}'}
E assert {'field': '{"...72c\\u8a9e"}'} == {'field': '{"test": "日本語"}'}
E Differing items:
E {'field': '{"test": "\\u65e5\\u672c\\u8a9e"}'} != {'field': '{"test": "日本語"}'}
E Use -v to get the full diff
----------------------------- Captured stderr call -----------------------------
Thank you!
use
json.dumps(v, ensure_ascii=False)
Sample:
Before result:
After result: