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

Function test_auth_disable_per_request

tests/client/test_auth.py:289–300  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

287
288@pytest.mark.anyio
289async def test_auth_disable_per_request() -> None:
290 url = "https://example.org/"
291 auth = ("user", "password123")
292 app = App()
293
294 async with httpx.AsyncClient(
295 transport=httpx.MockTransport(app), auth=auth
296 ) as client:
297 response = await client.get(url, auth=None)
298
299 assert response.status_code == 200
300 assert response.json() == {"auth": None}
301
302
303def test_auth_hidden_url() -> None:

Callers

nothing calls this directly

Calls 3

AppClass · 0.85
jsonMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected