diff options
Diffstat (limited to 'test/test_proxy.py')
-rw-r--r-- | test/test_proxy.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py index 3707fabe..76d8758c 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -9,6 +9,7 @@ from libmproxy.proxy.server import DummyServer, ProxyServer, ConnectionHandler import tutils from libpathod import test from netlib import http, tcp +from netlib.http import http1 class TestServerConnection: @@ -26,11 +27,10 @@ class TestServerConnection: f.request.path = "/p/200:da" # use this protocol just to assemble - not for actual sending - protocol = http.http1.HTTP1Protocol(rfile=sc.rfile) - sc.send(protocol.assemble(f.request)) + sc.wfile.write(http1.assemble_request(f.request)) + sc.wfile.flush() - protocol = http.http1.HTTP1Protocol(rfile=sc.rfile) - assert protocol.read_response(f.request.method, 1000) + assert http1.read_response(sc.rfile, f.request, 1000) assert self.d.last_log() sc.finish() |