diff --git a/tests/api/test_responses.py b/tests/api/test_responses.py index de944dfe7..70886b21a 100644 --- a/tests/api/test_responses.py +++ b/tests/api/test_responses.py @@ -54,7 +54,7 @@ def test_openapi_json_behind_proxy(simple_app): swagger_json = app_client.get('/v1.0/' + simple_app._spec_file.replace('.yaml', '.json'), headers=headers) assert swagger_json.status_code == 200 assert swagger_json.headers.get('Content-Type') == 'application/json' - json_ = swagger_json.json + json_ = json.loads(swagger_json.data.decode('utf-8')) if simple_app._spec_file == 'openapi.yaml': assert b'url: "/behind/proxy/v1.0/openapi.json"' in swagger_ui.data