(aiohttp_client: Any)
| 4725 | |
| 4726 | |
| 4727 | async def test_socket_timeout(aiohttp_client: Any) -> None: |
| 4728 | async def handler(request): |
| 4729 | await asyncio.sleep(5) |
| 4730 | return web.Response() |
| 4731 | |
| 4732 | app = web.Application() |
| 4733 | app.add_routes([web.get("/", handler)]) |
| 4734 | |
| 4735 | timeout = aiohttp.ClientTimeout(sock_read=0.1) |
| 4736 | client = await aiohttp_client(app, timeout=timeout) |
| 4737 | |
| 4738 | with pytest.raises(SocketTimeoutError): |
| 4739 | await client.get("/") |
| 4740 | |
| 4741 | |
| 4742 | async def test_read_timeout_closes_connection(aiohttp_client: AiohttpClient) -> None: |
nothing calls this directly
no test coverage detected