Only pass body on PATCH/POST/PUT request (#761)

Fixes #757
This commit is contained in:
Daniel Grossmann-Kavanagh
2018-11-09 17:27:08 +10:00
committed by João Santos
parent 638e4e6455
commit 53dffc0b78
7 changed files with 14 additions and 17 deletions

View File

@@ -205,8 +205,8 @@ def test_schema_array(schema_app):
app_client = schema_app.app.test_client()
headers = {'Content-type': 'application/json'}
array_request = app_client.get('/v1.0/schema_array', headers=headers,
data=json.dumps(['list', 'hello'])) # type: flask.Response
array_request = app_client.post('/v1.0/schema_array', headers=headers,
data=json.dumps(['list', 'hello'])) # type: flask.Response
assert array_request.status_code == 200
assert array_request.content_type == 'application/json'
array_response = json.loads(array_request.data.decode('utf-8', 'replace')) # type: list
@@ -217,8 +217,8 @@ def test_schema_int(schema_app):
app_client = schema_app.app.test_client()
headers = {'Content-type': 'application/json'}
array_request = app_client.get('/v1.0/schema_int', headers=headers,
data=json.dumps(42)) # type: flask.Response
array_request = app_client.post('/v1.0/schema_int', headers=headers,
data=json.dumps(42)) # type: flask.Response
assert array_request.status_code == 200
assert array_request.content_type == 'application/json'
array_response = json.loads(array_request.data.decode('utf-8', 'replace')) # type: list