diff options
Diffstat (limited to 'test/mitmproxy/net/http/test_response.py')
-rw-r--r-- | test/mitmproxy/net/http/test_response.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/mitmproxy/net/http/test_response.py b/test/mitmproxy/net/http/test_response.py index 27c16be6..08d72840 100644 --- a/test/mitmproxy/net/http/test_response.py +++ b/test/mitmproxy/net/http/test_response.py @@ -77,6 +77,12 @@ class TestResponseCore: resp.data.reason = b'cr\xe9e' assert resp.reason == "crée" + # HTTP2 responses do not contain a reason phrase and self.data.reason will be None. + # This should render to an empty reason phrase so that functions + # expecting a string work properly. + resp.data.reason = None + assert resp.reason == "" + class TestResponseUtils: """ |