From 0b532789a0823fcce68631ee78193ad2dd159572 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 21 Sep 2016 20:34:01 -0700 Subject: fix Response.make content-length header --- test/netlib/http/test_response.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/netlib/http/test_response.py') 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): -- cgit v1.2.3