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

Function return_json

tests/test_json.py:32–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30def test_json_bad_requests(app, client):
31 @app.route("/json", methods=["POST"])
32 def return_json():
33 return flask.jsonify(foo=str(flask.request.get_json()))
34
35 rv = client.post("/json", data="malformed", content_type="application/json")
36 assert rv.status_code == 400

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected