aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_flow.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_flow.py')
-rw-r--r--test/test_flow.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_flow.py b/test/test_flow.py
index 0cd45576..ca862bda 100644
--- a/test/test_flow.py
+++ b/test/test_flow.py
@@ -8,8 +8,8 @@ import mock
import netlib.utils
from netlib import odict
-from netlib.http import CONTENT_MISSING, HDR_FORM_URLENCODED, Headers
-from libmproxy import filt, protocol, controller, tnetstring, flow
+from netlib.http import CONTENT_MISSING, Headers
+from libmproxy import filt, controller, tnetstring, flow
from libmproxy.models import Error, Flow, HTTPRequest, HTTPResponse, HTTPFlow, decoded
from libmproxy.proxy.config import HostMatcher
from libmproxy.proxy import ProxyConfig
@@ -849,7 +849,7 @@ class TestFlowMaster:
s = flow.State()
f = tutils.tflow()
- f.response = HTTPResponse.wrap(netlib.tutils.tresp(body=f.request))
+ f.response = HTTPResponse.wrap(netlib.tutils.tresp(content=f.request))
pb = [f]
fm = flow.FlowMaster(None, s)
@@ -903,7 +903,7 @@ class TestFlowMaster:
def test_server_playback_kill(self):
s = flow.State()
f = tutils.tflow()
- f.response = HTTPResponse.wrap(netlib.tutils.tresp(body=f.request))
+ f.response = HTTPResponse.wrap(netlib.tutils.tresp(content=f.request))
pb = [f]
fm = flow.FlowMaster(None, s)
fm.refresh_server_playback = True
@@ -1044,7 +1044,7 @@ class TestRequest:
def test_getset_form_urlencoded(self):
d = odict.ODict([("one", "two"), ("three", "four")])
r = HTTPRequest.wrap(netlib.tutils.treq(content=netlib.utils.urlencode(d.lst)))
- r.headers["content-type"] = HDR_FORM_URLENCODED
+ r.headers["content-type"] = "application/x-www-form-urlencoded"
assert r.get_form_urlencoded() == d
d = odict.ODict([("x", "y")])