code reformatting
This commit is contained in:
@@ -22,7 +22,7 @@ def test_show_oas_of_app(cmd_line):
|
||||
args.func(args)
|
||||
|
||||
expected = dedent(
|
||||
"""
|
||||
"""
|
||||
{
|
||||
"info": {
|
||||
"title": "Aiohttp pydantic application",
|
||||
@@ -73,7 +73,7 @@ def test_show_oas_of_sub_app(cmd_line):
|
||||
args.output = StringIO()
|
||||
args.func(args)
|
||||
expected = dedent(
|
||||
"""
|
||||
"""
|
||||
{
|
||||
"info": {
|
||||
"title": "Aiohttp pydantic application",
|
||||
|
||||
@@ -37,7 +37,10 @@ def test_info_version():
|
||||
assert oas.info.version == "1.0.0"
|
||||
oas.info.version = "3.14"
|
||||
assert oas.info.version == "3.14"
|
||||
assert oas.spec == {"info": {"version": "3.14", "title": "Aiohttp pydantic application"}, "openapi": "3.0.0"}
|
||||
assert oas.spec == {
|
||||
"info": {"version": "3.14", "title": "Aiohttp pydantic application"},
|
||||
"openapi": "3.0.0",
|
||||
}
|
||||
|
||||
|
||||
def test_info_terms_of_service():
|
||||
|
||||
@@ -318,22 +318,32 @@ async def test_simple_type_route_should_have_get_method(generated_oas):
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
async def test_generated_view_info_default():
|
||||
apps = (web.Application(),)
|
||||
spec = generate_oas(apps)
|
||||
|
||||
assert spec == {'info': {'title': 'Aiohttp pydantic application', 'version': '1.0.0'}, 'openapi': '3.0.0'}
|
||||
assert spec == {
|
||||
"info": {"title": "Aiohttp pydantic application", "version": "1.0.0"},
|
||||
"openapi": "3.0.0",
|
||||
}
|
||||
|
||||
|
||||
async def test_generated_view_info_as_version():
|
||||
apps = (web.Application(),)
|
||||
spec = generate_oas(apps, version_spec="test version")
|
||||
|
||||
assert spec == {'info': {'title': 'Aiohttp pydantic application', 'version': 'test version'}, 'openapi': '3.0.0'}
|
||||
assert spec == {
|
||||
"info": {"title": "Aiohttp pydantic application", "version": "test version"},
|
||||
"openapi": "3.0.0",
|
||||
}
|
||||
|
||||
|
||||
async def test_generated_view_info_as_title():
|
||||
apps = (web.Application(),)
|
||||
spec = generate_oas(apps, title_spec="test title")
|
||||
|
||||
assert spec == {'info': {'title': 'test title', 'version': '1.0.0'}, 'openapi': '3.0.0'}
|
||||
assert spec == {
|
||||
"info": {"title": "test title", "version": "1.0.0"},
|
||||
"openapi": "3.0.0",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user