MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / test_reason

Method test_reason

test/mitmproxy/test_http.py:522–533  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

520 _test_passthrough_attr(tresp(), "status_code")
521
522 def test_reason(self):
523 resp = tresp()
524 assert resp.reason == "OK"
525
526 resp.reason = "ABC"
527 assert resp.data.reason == b"ABC"
528
529 resp.reason = b"DEF"
530 assert resp.data.reason == b"DEF"
531
532 resp.data.reason = b"cr\xe9e"
533 assert resp.reason == "crée"
534
535
536class TestResponseUtils:

Callers

nothing calls this directly

Calls 1

trespFunction · 0.90

Tested by

no test coverage detected