test_api.py 文件源码

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

项目:pactum 作者: osantana 项目源码 文件源码
def test_warning_api_with_different_selectors(version, route):
    other_version = Version(
        name="2.0",
        selector=version_selector("application/vnd.test.v2+json"),
        routes=(
            route,
        ),
    )

    api = API(
        name="Test API",
        versions=(
            version,
            other_version,
        )
    )

    with pytest.warns(SpecificationWarning):
        api.validate()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号