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

Function test_auth_hidden_header

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

Source from the content-addressed store, hash-verified

309
310@pytest.mark.anyio
311async def test_auth_hidden_header() -> None:
312 url = "https://example.org/"
313 auth = ("example-username", "example-password")
314 app = App()
315
316 async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:
317 response = await client.get(url, auth=auth)
318
319 assert "'authorization': '[secure]'" in str(response.request.headers)
320
321
322@pytest.mark.anyio

Callers

nothing calls this directly

Calls 2

AppClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected