(
tls_ca_ssl_context,
tls_certificate_server_cert_path,
tls_ca_certificate_pem_path,
tls_certificate_private_key_encrypted_path,
unused_tcp_port: int,
)
| 80 | |
| 81 | @pytest.mark.anyio |
| 82 | async def test_run_password( |
| 83 | tls_ca_ssl_context, |
| 84 | tls_certificate_server_cert_path, |
| 85 | tls_ca_certificate_pem_path, |
| 86 | tls_certificate_private_key_encrypted_path, |
| 87 | unused_tcp_port: int, |
| 88 | ): |
| 89 | config = Config( |
| 90 | app=app, |
| 91 | loop=class="st">"asyncio", |
| 92 | limit_max_requests=1, |
| 93 | ssl_keyfile=tls_certificate_private_key_encrypted_path, |
| 94 | ssl_certfile=tls_certificate_server_cert_path, |
| 95 | ssl_keyfile_password=class="st">"uvicorn password for the win", |
| 96 | ssl_ca_certs=tls_ca_certificate_pem_path, |
| 97 | port=unused_tcp_port, |
| 98 | ) |
| 99 | async with run_server(config): |
| 100 | async with httpx.AsyncClient(verify=tls_ca_ssl_context) as client: |
| 101 | response = await client.get(fclass="st">"https://127.0.0.1:{unused_tcp_port}") |
| 102 | assert response.status_code == 204 |
| 103 | |
| 104 | |
| 105 | @pytest.mark.anyio |
nothing calls this directly
no test coverage detected