aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_proxy.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-07-29 11:39:53 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-07-30 13:53:17 +0200
commita5d9e1f44dbe0fc6fee174b1953806f9b148b5ad (patch)
tree0ee53b14c3513472ea1597144b228841454eef4f /test/test_proxy.py
parent89f22f735944989912a7a0394dd7e80d420cb0f3 (diff)
downloadmitmproxy-a5d9e1f44dbe0fc6fee174b1953806f9b148b5ad.tar.gz
mitmproxy-a5d9e1f44dbe0fc6fee174b1953806f9b148b5ad.tar.bz2
mitmproxy-a5d9e1f44dbe0fc6fee174b1953806f9b148b5ad.zip
move code to netlib and implement protocols
Diffstat (limited to 'test/test_proxy.py')
-rw-r--r--test/test_proxy.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py
index 01fbe953..6ab19e02 100644
--- a/test/test_proxy.py
+++ b/test/test_proxy.py
@@ -30,7 +30,10 @@ class TestServerConnection:
f = tutils.tflow()
f.server_conn = sc
f.request.path = "/p/200:da"
- sc.send(f.request.assemble())
+
+ # use this protocol just to assemble - not for actual sending
+ protocol = http.http1.HTTP1Protocol(rfile=sc.rfile)
+ sc.send(protocol.assemble(f.request))
protocol = http.http1.HTTP1Protocol(rfile=sc.rfile)
assert protocol.read_response(f.request.method, 1000)