Files
connexion/tests/api/test_unordered_definition.py
Robbe Sneyders 022bb8f34a Coerce types only in uri parser (#1627)
This PR moves all type coercing into the URI parsers and makes sure it's
only done once for each code path.
2023-01-30 08:49:49 +01:00

12 lines
421 B
Python

import json
def test_app(unordered_definition_app):
app_client = unordered_definition_app.test_client()
response = app_client.get(
"/v1.0/unordered-params/1?first=first&second=2"
) # type: flask.Response
assert response.status_code == 400
response_data = json.loads(response.data.decode("utf-8", "replace"))
assert response_data["detail"].startswith("'first' is not of type 'integer'")