MCPcopy Create free account
hub / github.com/aio-libs/aiohttp / test_basic_auth

Function test_basic_auth

tests/test_client_request.py:439–444  ·  view source on GitHub ↗
(make_request)

Source from the content-addressed store, hash-verified

437
438
439def test_basic_auth(make_request) -> None:
440 with pytest.warns(DeprecationWarning, match="BasicAuth is deprecated"):
441 auth = aiohttp.BasicAuth("nkim", "1234")
442 req = make_request("get", "http://python.org", auth=auth)
443 assert "AUTHORIZATION" in req.headers
444 assert "Basic bmtpbToxMjM0" == req.headers["AUTHORIZATION"]
445
446
447def test_basic_auth_utf8(make_request) -> None:

Callers

nothing calls this directly

Calls 1

make_requestFunction · 0.70

Tested by

no test coverage detected