Exemplo n.º 1
0
def server(_app):
    """Run the app on an unused port."""
    port = run_server(_app)
    yield {"port": port}
Exemplo n.º 2
0
def test_exact_port():
    app = _aiohttp.create_openapi_app(("success", "failure"))
    run_server(app, 8999)
    response = requests.get("http://localhost:8999/schema.yaml")
    assert response.status_code == 200