MCPcopy
hub / github.com/encode/uvicorn / test_run_chain

Function test_run_chain

tests/test_ssl.py:46–63  ·  tests/test_ssl.py::test_run_chain
(
    tls_ca_ssl_context,
    tls_certificate_key_and_chain_path,
    tls_ca_certificate_pem_path,
    unused_tcp_port: int,
)

Source from the content-addressed store, hash-verified

44
45@pytest.mark.anyio
46async def test_run_chain(
47 tls_ca_ssl_context,
48 tls_certificate_key_and_chain_path,
49 tls_ca_certificate_pem_path,
50 unused_tcp_port: int,
51):
52 config = Config(
53 app=app,
54 loop=class="st">"asyncio",
55 limit_max_requests=1,
56 ssl_certfile=tls_certificate_key_and_chain_path,
57 ssl_ca_certs=tls_ca_certificate_pem_path,
58 port=unused_tcp_port,
59 )
60 async with run_server(config):
61 async with httpx.AsyncClient(verify=tls_ca_ssl_context) as client:
62 response = await client.get(fclass="st">"https://127.0.0.1:{unused_tcp_port}")
63 assert response.status_code == 204
64
65
66@pytest.mark.anyio

Callers

nothing calls this directly

Calls 2

ConfigClass · 0.90
run_serverFunction · 0.90

Tested by

no test coverage detected