diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-09-21 20:34:01 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-09-21 20:34:01 -0700 |
commit | 0b532789a0823fcce68631ee78193ad2dd159572 (patch) | |
tree | 2486343934e6eccfce528153eb1c8494be6b3015 /test/netlib/http/test_response.py | |
parent | 1e5a5b03f8d56df62a04a368bd5eb2d59cb7582a (diff) | |
download | mitmproxy-0b532789a0823fcce68631ee78193ad2dd159572.tar.gz mitmproxy-0b532789a0823fcce68631ee78193ad2dd159572.tar.bz2 mitmproxy-0b532789a0823fcce68631ee78193ad2dd159572.zip |
fix Response.make content-length header
Diffstat (limited to 'test/netlib/http/test_response.py')
-rw-r--r-- | test/netlib/http/test_response.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/netlib/http/test_response.py b/test/netlib/http/test_response.py index c7b1b646..e97cc419 100644 --- a/test/netlib/http/test_response.py +++ b/test/netlib/http/test_response.py @@ -34,6 +34,11 @@ class TestResponseCore(object): assert r.status_code == 200 assert r.content == b"" + r = Response.make(418, "teatime") + assert r.status_code == 418 + assert r.content == b"teatime" + assert r.headers["content-length"] == "7" + Response.make(content=b"foo") Response.make(content="foo") with raises(TypeError): |