aboutsummaryrefslogtreecommitdiffstats
path: root/test/http/http1/test_protocol.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-07-22 13:01:24 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-07-22 16:13:06 +0200
commit657973eca3b091cdf07a65f8363affd3d36f0d0f (patch)
treea6ee3ae4aa49e1b9922e48d4b05afe03bc8effdd /test/http/http1/test_protocol.py
parentfaf17d3d60e658d0cd1df30a10be4f11035502f8 (diff)
downloadmitmproxy-657973eca3b091cdf07a65f8363affd3d36f0d0f.tar.gz
mitmproxy-657973eca3b091cdf07a65f8363affd3d36f0d0f.tar.bz2
mitmproxy-657973eca3b091cdf07a65f8363affd3d36f0d0f.zip
fix bugs
Diffstat (limited to 'test/http/http1/test_protocol.py')
-rw-r--r--test/http/http1/test_protocol.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/http/http1/test_protocol.py b/test/http/http1/test_protocol.py
index 8d05b31f..dcebbd5e 100644
--- a/test/http/http1/test_protocol.py
+++ b/test/http/http1/test_protocol.py
@@ -8,12 +8,9 @@ from ... import tutils, tservers
def mock_protocol(data='', chunked=False):
- class TCPHandlerMock(object):
- pass
- tcp_handler = TCPHandlerMock()
- tcp_handler.rfile = cStringIO.StringIO(data)
- tcp_handler.wfile = cStringIO.StringIO()
- return HTTP1Protocol(tcp_handler)
+ rfile = cStringIO.StringIO(data)
+ wfile = cStringIO.StringIO()
+ return HTTP1Protocol(rfile=rfile, wfile=wfile)