shy-advantage-49800
11/12/2022, 8:24 AMcurved-television-6568
11/12/2022, 12:23 PMshy-advantage-49800
11/12/2022, 12:29 PMcurved-television-6568
11/12/2022, 1:00 PM================================================== test session starts ===================================================
platform darwin -- Python 3.7.13, pytest-7.0.1, pluggy-1.0.0 -- /Users/andreas.stenius/.cache/pants/named_caches/pex_root/venvs/s/578dffe4/venv/bin/python3.7
cachedir: .pytest_cache
rootdir: /private/var/folders/y2/6t5bbk554wv5h6w_qlgpcpnm0000gr/T/pants-sandbox-3dqcUX
plugins: xdist-2.5.0, forked-1.4.0, anyio-3.6.2, cov-3.0.0
collected 108 items / 100 deselected / 8 selected
tests/test_http.py::test_request_logging[HTTPProtocol0-/] PASSED [ 12%]
tests/test_http.py::test_request_logging[HTTPProtocol0-/?foo] PASSED [ 25%]
tests/test_http.py::test_request_logging[HTTPProtocol0-/?foo=bar] PASSED [ 37%]
tests/test_http.py::test_request_logging[HTTPProtocol0-/?foo=bar&baz=1] PASSED [ 50%]
tests/test_http.py::test_request_logging[HTTPProtocol1-/] PASSED [ 62%]
tests/test_http.py::test_request_logging[HTTPProtocol1-/?foo] PASSED [ 75%]
tests/test_http.py::test_request_logging[HTTPProtocol1-/?foo=bar] PASSED [ 87%]
tests/test_http.py::test_request_logging[HTTPProtocol1-/?foo=bar&baz=1] PASSED [100%]
=========================================== 8 passed, 100 deselected in 0.09s ============================================
#@pytest.mark.skip(reason="Issue with capture logs fixture.")
@pytest.mark.anyio
@pytest.mark.parametrize("path", ["/", "/?foo", "/?foo=bar", "/?foo=bar&baz=1"])
async def test_request_logging(path, http_protocol, caplog): # pragma: no cover
get_request_with_query_string = b"\r\n".join(
["GET {} HTTP/1.1".format(path).encode("ascii"), b"Host: <http://example.org|example.org>", b"", b""]
)
#caplog.set_level(<http://logging.INFO|logging.INFO>)
caplog.set_level(<http://logging.INFO|logging.INFO>, logger="uvicorn.access")
#logging.getLogger("uvicorn.access").propagate = True
assert logging.getLogger("uvicorn.access").propagate
assert logging.getLogger("uvicorn").propagate
app = Response("Hello, world", media_type="text/plain")
...
shy-advantage-49800
11/12/2022, 1:03 PMcurved-television-6568
11/12/2022, 1:17 PM./pants test <target> -- -k <testname pattern>
./pants --loop test --debug tests/test_http.py -- -vv -k request_logging
shy-advantage-49800
11/12/2022, 1:19 PM