示例#1
0
def test_05():
    validate(PASS_SWAGGER, swaggers)
    with pytest.raises(ValueError):
        validate(PASS_SWAGGER, openapis)
    with pytest.raises(ValueError):
        validate(PASS_OPENAPI, swaggers)
示例#2
0
def test_02():
    validate(PASS_TRANSLATOR, {"openapi": openapis["openapi_v3"]})
    validate(PASS_TRANSLATOR, {"x-translator": openapis["x-translator"]})
    validate(PASS_TRANSLATOR, openapis)
示例#3
0
def test_04():
    validate(FAIL_TRANSLATOR_2, {"openapi": openapis["openapi_v3"]})
    with pytest.raises(ValueError):
        validate(FAIL_TRANSLATOR_2, openapis)
示例#4
0
def test_01():
    validate(PASS_OPENAPI, {"openapi": openapis["openapi_v3"]})
    validate(PASS_OPENAPI, openapis)