MCPcopy
hub / github.com/encode/httpx / test_logging

Function test_logging

tests/test_wsgi.py:150–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148
149
150def test_logging():
151 buffer = StringIO()
152 transport = httpx.WSGITransport(app=log_to_wsgi_log_buffer, wsgi_errors=buffer)
153 client = httpx.Client(transport=transport)
154 response = client.post("http://www.example.org/", content=b"example")
155 assert response.status_code == 200 # no errors
156 buffer.seek(0)
157 assert buffer.read() == "test1\ntest2"
158
159
160@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

postMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected