diff options
author | Maximilian Hils <git@maximilianhils.com> | 2013-12-08 01:39:50 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2013-12-08 01:39:50 +0100 |
commit | 64139a1e7ed32f5d995c8fdea0d82c2d2d44f195 (patch) | |
tree | 57f82ac4c4be727098a577f82e9d6a33a4c41e95 /test/test_http.py | |
parent | 390f2a46c920ee332d758d6c46999b5147e0b30b (diff) | |
parent | 7213f86d49960a625643fb6179e6a3731b16d462 (diff) | |
download | mitmproxy-64139a1e7ed32f5d995c8fdea0d82c2d2d44f195.tar.gz mitmproxy-64139a1e7ed32f5d995c8fdea0d82c2d2d44f195.tar.bz2 mitmproxy-64139a1e7ed32f5d995c8fdea0d82c2d2d44f195.zip |
merge origin/master
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() |