mirror of
https://github.com/LukeHagar/connexion.git
synced 2025-12-07 04:19:28 +00:00
Test custom values in problem response
This commit is contained in:
@@ -60,3 +60,9 @@ def test_errors(problem_app):
|
||||
problematic_json = app_client.get(
|
||||
'/v1.0/json_response_with_undefined_value_to_serialize') # type: flask.Response
|
||||
assert problematic_json.status_code == 500
|
||||
|
||||
custom_problem = app_client.get('/v1.0/customized_problem_response')
|
||||
assert custom_problem.status_code == 402
|
||||
problem_body = json.loads(custom_problem.data.decode('utf-8'))
|
||||
assert 'amount' in problem_body
|
||||
assert problem_body['amount'] == 23.
|
||||
|
||||
Reference in New Issue
Block a user