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()
评论列表
文章目录