MCPcopy
hub / github.com/encode/httpx / test_asgi_transport

Function test_asgi_transport

tests/test_asgi.py:74–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72
73@pytest.mark.anyio
74async def test_asgi_transport():
75 async with httpx.ASGITransport(app=hello_world) as transport:
76 request = httpx.Request("GET", "http://www.example.com/")
77 response = await transport.handle_async_request(request)
78 await response.aread()
79 assert response.status_code == 200
80 assert response.content == b"Hello, World!"
81
82
83@pytest.mark.anyio

Callers

nothing calls this directly

Calls 2

handle_async_requestMethod · 0.45
areadMethod · 0.45

Tested by

no test coverage detected