diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-09-21 21:49:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-21 21:49:14 -0700 |
commit | 9e0b935fa241bc50b8c91cbdae32cb1df41ef3f1 (patch) | |
tree | 642e61bb76bd2819191f0a9f8c2d5faef352721a /test/netlib | |
parent | d5427c7298b0c6aee009a86dec041011427689e9 (diff) | |
parent | 0b532789a0823fcce68631ee78193ad2dd159572 (diff) | |
download | mitmproxy-9e0b935fa241bc50b8c91cbdae32cb1df41ef3f1.tar.gz mitmproxy-9e0b935fa241bc50b8c91cbdae32cb1df41ef3f1.tar.bz2 mitmproxy-9e0b935fa241bc50b8c91cbdae32cb1df41ef3f1.zip |
Merge pull request #1564 from mhils/issue-1554
Fix Response.make content-length header
Diffstat (limited to 'test/netlib')
-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): |