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

Function test_basic_auth_utf8

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

Source from the content-addressed store, hash-verified

445
446
447def test_basic_auth_utf8(make_request) -> None:
448 with pytest.warns(DeprecationWarning, match="BasicAuth is deprecated"):
449 auth = aiohttp.BasicAuth("nkim", "секрет", "utf-8")
450 req = make_request("get", "http://python.org", auth=auth)
451 assert "AUTHORIZATION" in req.headers
452 assert "Basic bmtpbTrRgdC10LrRgNC10YI=" == req.headers["AUTHORIZATION"]
453
454
455def test_basic_auth_tuple_forbidden(make_request) -> None:

Callers

nothing calls this directly

Calls 1

make_requestFunction · 0.70

Tested by

no test coverage detected