MCPcopy Create free account
hub / github.com/pallets/flask / test_jsonify_no_prettyprint

Function test_jsonify_no_prettyprint

tests/test_basic.py:1302–1307  ·  view source on GitHub ↗
(app, compact)

Source from the content-addressed store, hash-verified

1300
1301@pytest.mark.parametrize("compact", [True, False])
1302def test_jsonify_no_prettyprint(app, compact):
1303 app.json.compact = compact
1304 rv = app.json.response({"msg": {"submsg": "W00t"}, "msg2": "foobar"})
1305 data = rv.data.strip()
1306 assert (b" " not in data) is compact
1307 assert (b"\n" not in data) is compact
1308
1309
1310def test_jsonify_mimetype(app, req_ctx):

Callers

nothing calls this directly

Calls 1

responseMethod · 0.45

Tested by

no test coverage detected