clean up JSON code and docs

This commit is contained in:
David Lord 2017-06-04 11:44:00 -07:00
parent dbc70c9274
commit e97253e4c1
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
5 changed files with 91 additions and 83 deletions

View file

@ -267,7 +267,7 @@ def test_full_url_request(app, client):
def test_json_request_and_response(app, client):
@app.route('/echo', methods=['POST'])
def echo():
return jsonify(flask.request.json)
return jsonify(flask.request.get_json())
with client:
json_data = {'drink': {'gin': 1, 'tonic': True}, 'price': 10}