def test_swagger_full(app):
"""
Test a swagger config for a fully configured setup.
"""
app.config.update(
SERVER_NAME='api.example.com',
OPENAPI_SHOW_HOST=True,
OPENAPI_INFO_VERSION='1.2.3'
)
openapi = OpenAPI(app)
assert openapi.swagger == {
'swagger': '2.0',
'info': {
'title': 'test_swagger_full',
'version': '1.2.3'
},
'paths': ANY,
'host': 'api.example.com',
'schemes': ['http']
}
评论列表
文章目录