extension_test.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:flask-openapi 作者: remcohaszing 项目源码 文件源码
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']
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号