aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/builtins/test_script.py8
-rw-r--r--test/mitmproxy/test_addons.py2
-rw-r--r--test/mitmproxy/test_examples.py7
3 files changed, 5 insertions, 12 deletions
diff --git a/test/mitmproxy/builtins/test_script.py b/test/mitmproxy/builtins/test_script.py
index 261adb65..54451313 100644
--- a/test/mitmproxy/builtins/test_script.py
+++ b/test/mitmproxy/builtins/test_script.py
@@ -237,12 +237,8 @@ class TestScriptLoader(mastertest.MasterTest):
"%s %s" % (rec, "b"),
]
debug = [(i[0], i[1]) for i in m.event_log if i[0] == "debug"]
- assert debug == [
- ('debug', 'c configure'),
- ('debug', 'a configure'),
- ('debug', 'b configure'),
- ]
- m.event_log[:] = []
+ # No events, only order has changed
+ assert debug == []
o.scripts = [
"%s %s" % (rec, "x"),
diff --git a/test/mitmproxy/test_addons.py b/test/mitmproxy/test_addons.py
index 52d7f07f..c5d54e8c 100644
--- a/test/mitmproxy/test_addons.py
+++ b/test/mitmproxy/test_addons.py
@@ -16,6 +16,6 @@ def test_simple():
o = options.Options()
m = controller.Master(o)
a = addons.Addons(m)
- a.add(o, TAddon("one"))
+ a.add(TAddon("one"))
assert a.get("one")
assert not a.get("two")
diff --git a/test/mitmproxy/test_examples.py b/test/mitmproxy/test_examples.py
index 1ba7ba7a..483cb228 100644
--- a/test/mitmproxy/test_examples.py
+++ b/test/mitmproxy/test_examples.py
@@ -87,11 +87,8 @@ class TestScripts(mastertest.MasterTest):
m.request(f)
assert f.request.query["mitmproxy"] == "rocks"
- def test_modify_response_body(self):
- with tutils.raises(ScriptError):
- tscript("modify_response_body.py")
-
- m, sc = tscript("modify_response_body.py", "mitmproxy rocks")
+ def test_arguments(self):
+ m, sc = tscript("arguments.py", "mitmproxy rocks")
f = tutils.tflow(resp=netutils.tresp(content=b"I <3 mitmproxy"))
m.response(f)
assert f.response.content == b"I <3 rocks"