aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2016-10-04 10:54:15 +1100
committerGitHub <noreply@github.com>2016-10-04 10:54:15 +1100
commit3d5b81199431f3232ebf6050f1b033e61d1172f4 (patch)
tree0d111125733f9211f170f345f506738bf4ba6804 /test
parentb0add569b988e9f1e319b9577fbd8e076ac5bd23 (diff)
parent2bd868662937b504cccd825e9e24e3cb6a142708 (diff)
downloadmitmproxy-3d5b81199431f3232ebf6050f1b033e61d1172f4.tar.gz
mitmproxy-3d5b81199431f3232ebf6050f1b033e61d1172f4.tar.bz2
mitmproxy-3d5b81199431f3232ebf6050f1b033e61d1172f4.zip
Merge pull request #1592 from cortesi/ws
docs and API-related cleanups
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/builtins/test_script.py2
-rw-r--r--test/mitmproxy/test_server.py5
2 files changed, 3 insertions, 4 deletions
diff --git a/test/mitmproxy/builtins/test_script.py b/test/mitmproxy/builtins/test_script.py
index f92765ee..261adb65 100644
--- a/test/mitmproxy/builtins/test_script.py
+++ b/test/mitmproxy/builtins/test_script.py
@@ -175,7 +175,7 @@ class TestScriptLoader(mastertest.MasterTest):
), [f]
)
evts = [i[1] for i in sc.ns.call_log]
- assert evts == ['start', 'request', 'responseheaders', 'response', 'done']
+ assert evts == ['start', 'requestheaders', 'request', 'responseheaders', 'response', 'done']
with m.handlecontext():
tutils.raises(
diff --git a/test/mitmproxy/test_server.py b/test/mitmproxy/test_server.py
index 059ea856..ec59fbdf 100644
--- a/test/mitmproxy/test_server.py
+++ b/test/mitmproxy/test_server.py
@@ -807,8 +807,7 @@ class TestStreamRequest(tservers.HTTPProxyTest):
class MasterFakeResponse(tservers.TestMaster):
@controller.handler
def request(self, f):
- resp = HTTPResponse.wrap(netlib.tutils.tresp())
- f.reply.send(resp)
+ f.response = HTTPResponse.wrap(netlib.tutils.tresp())
class TestFakeResponse(tservers.HTTPProxyTest):
@@ -889,7 +888,7 @@ class MasterIncomplete(tservers.TestMaster):
def request(self, f):
resp = HTTPResponse.wrap(netlib.tutils.tresp())
resp.content = None
- f.reply.send(resp)
+ f.response = resp
class TestIncompleteResponse(tservers.HTTPProxyTest):