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

Function test_guess_by_bom

tests/test_utils.py:47–50  ·  view source on GitHub ↗
(encoding, expected)

Source from the content-addressed store, hash-verified

45 ),
46)
47def test_guess_by_bom(encoding, expected):
48 content = '\ufeff{"abc": 123}'.encode(encoding)
49 response = httpx.Response(200, content=content)
50 assert response.json() == {"abc": 123}
51
52
53def test_logging_request(server, caplog):

Callers

nothing calls this directly

Calls 1

jsonMethod · 0.95

Tested by

no test coverage detected