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

Function test_asgi_transport_no_body

tests/test_asgi.py:84–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82
83@pytest.mark.anyio
84async def test_asgi_transport_no_body():
85 async with httpx.ASGITransport(app=echo_body) as transport:
86 request = httpx.Request("GET", "http://www.example.com/")
87 response = await transport.handle_async_request(request)
88 await response.aread()
89 assert response.status_code == 200
90 assert response.content == b""
91
92
93@pytest.mark.anyio

Callers

nothing calls this directly

Calls 2

handle_async_requestMethod · 0.45
areadMethod · 0.45

Tested by

no test coverage detected