(aiohttp_client)
| 4479 | |
| 4480 | |
| 4481 | async def test_http_empty_data_text(aiohttp_client) -> None: |
| 4482 | async def handler(request): |
| 4483 | data = await request.read() |
| 4484 | ret = "ok" if data == b"" else "fail" |
| 4485 | resp = web.Response(text=ret) |
| 4486 | resp.headers["Content-Type"] = request.headers["Content-Type"] |
| 4487 | return resp |
| 4488 | |
| 4489 | app = web.Application() |
| 4490 | app.add_routes([web.post("/", handler)]) |
| 4491 | |
| 4492 | client = await aiohttp_client(app) |
| 4493 | |
| 4494 | async with await client.post("/", data="") as resp: |
| 4495 | assert resp.status == 200 |
| 4496 | assert await resp.text() == "ok" |
| 4497 | assert resp.headers["Content-Type"] == "text/plain; charset=utf-8" |
| 4498 | |
| 4499 | |
| 4500 | async def test_max_field_size_session_default(aiohttp_client: AiohttpClient) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…