(loop, conn)
| 865 | |
| 866 | |
| 867 | async def test_bytes_data(loop, conn) -> None: |
| 868 | for meth in ClientRequest.POST_METHODS: |
| 869 | req = ClientRequest( |
| 870 | meth, URL("http://python.org/"), data=b"binary data", loop=loop |
| 871 | ) |
| 872 | resp = await req.send(conn) |
| 873 | assert "/" == req.url.path |
| 874 | assert isinstance(req.body, payload.BytesPayload) |
| 875 | assert b"binary data" == req.body._value |
| 876 | assert "application/octet-stream" == req.headers["CONTENT-TYPE"] |
| 877 | await req.close() |
| 878 | resp.close() |
| 879 | |
| 880 | |
| 881 | @pytest.mark.usefixtures("parametrize_zlib_backend") |
nothing calls this directly
no test coverage detected