It seems it may be helpful to have an easy way to provide custom sockets in tests that aiohttp_client uses. Currently this seems to require patching an undocumented function. See comment: https://github.com/aio-libs/aiohttp/issues/5834#issuecomment-871616906 And referenced example: https://github.com/aio-libs/aiohttp/issues/5834#issuecomment-870794096