aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_controller.py10
-rw-r--r--test/mitmproxy/test_server.py4
2 files changed, 7 insertions, 7 deletions
diff --git a/test/mitmproxy/test_controller.py b/test/mitmproxy/test_controller.py
index 83ad428e..5a68e15b 100644
--- a/test/mitmproxy/test_controller.py
+++ b/test/mitmproxy/test_controller.py
@@ -66,7 +66,7 @@ class TestChannel(object):
def reply():
m, obj = q.get()
assert m == "test"
- obj.reply(42)
+ obj.reply.send(42)
Thread(target=reply).start()
@@ -86,7 +86,7 @@ class TestDummyReply(object):
def test_simple(self):
reply = controller.DummyReply()
assert not reply.acked
- reply()
+ reply.ack()
assert reply.acked
@@ -94,16 +94,16 @@ class TestReply(object):
def test_simple(self):
reply = controller.Reply(42)
assert not reply.acked
- reply("foo")
+ reply.send("foo")
assert reply.acked
assert reply.q.get() == "foo"
def test_default(self):
reply = controller.Reply(42)
- reply()
+ reply.ack()
assert reply.q.get() == 42
def test_reply_none(self):
reply = controller.Reply(42)
- reply(None)
+ reply.send(None)
assert reply.q.get() is None
diff --git a/test/mitmproxy/test_server.py b/test/mitmproxy/test_server.py
index 1cd6cb0c..432340c0 100644
--- a/test/mitmproxy/test_server.py
+++ b/test/mitmproxy/test_server.py
@@ -743,7 +743,7 @@ class MasterFakeResponse(tservers.TestMaster):
@controller.handler
def request(self, f):
resp = HTTPResponse.wrap(netlib.tutils.tresp())
- f.reply(resp)
+ f.reply.send(resp)
class TestFakeResponse(tservers.HTTPProxyTest):
@@ -819,7 +819,7 @@ class MasterIncomplete(tservers.TestMaster):
def request(self, f):
resp = HTTPResponse.wrap(netlib.tutils.tresp())
resp.content = None
- f.reply(resp)
+ f.reply.send(resp)
class TestIncompleteResponse(tservers.HTTPProxyTest):