mirror of
https://github.com/LukeHagar/connexion.git
synced 2025-12-09 20:37:46 +00:00
Corrected the Content-Type header for /basePath/swagger.json to return application/json and added a test for that
This commit is contained in:
@@ -72,6 +72,14 @@ def test_no_swagger_json_api(simple_api_spec_dir):
|
||||
assert swagger_json.status_code == 404
|
||||
|
||||
|
||||
def test_swagger_json_content_type(simple_app):
|
||||
app_client = simple_app.app.test_client()
|
||||
|
||||
response = app_client.get('/v1.0/swagger.json', data={}) # type: flask.Response
|
||||
assert response.status_code == 200
|
||||
assert response.content_type == 'application/json'
|
||||
|
||||
|
||||
def test_single_route(simple_app):
|
||||
def route1():
|
||||
return 'single 1'
|
||||
|
||||
Reference in New Issue
Block a user