aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_protocol_http.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-09 22:15:58 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-10 21:04:17 +0200
commit891fa50e554963ef7cf236b087cfbedfaf19849e (patch)
treef6d0347829b3cc7d35027083655b0de3762cef74 /test/test_protocol_http.py
parenta10c31c6984f9b6646d2a7bad05ace912ea152a7 (diff)
downloadmitmproxy-891fa50e554963ef7cf236b087cfbedfaf19849e.tar.gz
mitmproxy-891fa50e554963ef7cf236b087cfbedfaf19849e.tar.bz2
mitmproxy-891fa50e554963ef7cf236b087cfbedfaf19849e.zip
move code to netlib
Diffstat (limited to 'test/test_protocol_http.py')
-rw-r--r--test/test_protocol_http.py19
1 files changed, 1 insertions, 18 deletions
diff --git a/test/test_protocol_http.py b/test/test_protocol_http.py
index 81c39f09..2da54093 100644
--- a/test/test_protocol_http.py
+++ b/test/test_protocol_http.py
@@ -11,27 +11,12 @@ from netlib.http.semantics import CONTENT_MISSING
import tutils
import tservers
-def mock_protocol(data='', chunked=False):
+def mock_protocol(data=''):
rfile = cStringIO.StringIO(data)
wfile = cStringIO.StringIO()
return http1.HTTP1Protocol(rfile=rfile, wfile=wfile)
-# TODO: move test to netlib http1 protocol
-# def test_stripped_chunked_encoding_no_content():
-# """
-# https://github.com/mitmproxy/mitmproxy/issues/186
-# """
-# r = tutils.tresp(content="")
-# r.headers["Transfer-Encoding"] = ["chunked"]
-# assert "Content-Length" in r._assemble_headers()
-#
-# r = tutils.treq(content="")
-# r.headers["Transfer-Encoding"] = ["chunked"]
-# assert "Content-Length" in r._assemble_headers()
-#
-
-
class TestHTTPResponse:
def test_read_from_stringio(self):
s = "HTTP/1.1 200 OK\r\n" \
@@ -58,8 +43,6 @@ class TestHTTPResponse:
)
-
-
class TestHTTPFlow(object):
def test_repr(self):
f = tutils.tflow(resp=True, err=True)