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

Function test_asgi_urlencoded_path

tests/test_asgi.py:104–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102
103@pytest.mark.anyio
104async def test_asgi_urlencoded_path():
105 transport = httpx.ASGITransport(app=echo_path)
106 async with httpx.AsyncClient(transport=transport) as client:
107 url = httpx.URL("http://www.example.org/").copy_with(path="/user@example.org")
108 response = await client.get(url)
109
110 assert response.status_code == 200
111 assert response.json() == {"path": "/user@example.org"}
112
113
114@pytest.mark.anyio

Callers

nothing calls this directly

Calls 3

jsonMethod · 0.80
copy_withMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected