diff options
author | Maximilian Hils <git@maximilianhils.com> | 2013-11-19 04:11:24 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2013-11-19 04:11:24 +0100 |
commit | 5e4ccbd7edc6eebf9eee25fd4d6ca64994ed6522 (patch) | |
tree | fd69b0b7407d5a78a121b290bab995e5b1f8342e /test/test_http.py | |
parent | d081b058e62a2919f11660442ff56f48f05fac3e (diff) | |
download | mitmproxy-5e4ccbd7edc6eebf9eee25fd4d6ca64994ed6522.tar.gz mitmproxy-5e4ccbd7edc6eebf9eee25fd4d6ca64994ed6522.tar.bz2 mitmproxy-5e4ccbd7edc6eebf9eee25fd4d6ca64994ed6522.zip |
attempt to fix #24
Diffstat (limited to 'test/test_http.py')
-rw-r--r-- | test/test_http.py | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/test/test_http.py b/test/test_http.py index 62d0c3dc..4d89bf24 100644 --- a/test/test_http.py +++ b/test/test_http.py @@ -38,28 +38,16 @@ def test_read_chunked(): tutils.raises("too large", http.read_chunked, 500, s, 2) -def test_request_connection_close(): +def test_connection_close(): h = odict.ODictCaseless() - assert http.request_connection_close((1, 0), h) - assert not http.request_connection_close((1, 1), h) + assert http.connection_close((1, 0), h) + assert not http.connection_close((1, 1), h) h["connection"] = ["keep-alive"] - assert not http.request_connection_close((1, 1), h) + assert not http.connection_close((1, 1), h) h["connection"] = ["close"] - assert http.request_connection_close((1, 1), h) - - -def test_response_connection_close(): - h = odict.ODictCaseless() - assert http.response_connection_close((1, 1), h) - - h["content-length"] = [10] - assert not http.response_connection_close((1, 1), h) - - h["connection"] = ["close"] - assert http.response_connection_close((1, 1), h) - + assert http.connection_close((1, 1), h) def test_read_http_body_response(): h = odict.ODictCaseless() |