From 4fe83be63ca986754bcc9ab741c1fce3698a5053 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 24 Feb 2018 16:06:11 +1300 Subject: Resolve some left-over cross-addon dependencies --- test/mitmproxy/tools/console/test_master.py | 4 ---- test/mitmproxy/tools/web/test_static_viewer.py | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/mitmproxy/tools/console/test_master.py b/test/mitmproxy/tools/console/test_master.py index 6f46ce9e..6ea61991 100644 --- a/test/mitmproxy/tools/console/test_master.py +++ b/test/mitmproxy/tools/console/test_master.py @@ -7,10 +7,6 @@ from mitmproxy.tools import console from ... import tservers -def test_options(): - assert options.Options(server_replay_kill_extra=True) - - class TestMaster(tservers.MasterTest): def mkmaster(self, **opts): if "verbosity" not in opts: diff --git a/test/mitmproxy/tools/web/test_static_viewer.py b/test/mitmproxy/tools/web/test_static_viewer.py index cfe6cd7f..dfc45bc2 100644 --- a/test/mitmproxy/tools/web/test_static_viewer.py +++ b/test/mitmproxy/tools/web/test_static_viewer.py @@ -8,7 +8,7 @@ from mitmproxy import flowfilter from mitmproxy.tools.web.app import flow_to_json from mitmproxy.tools.web import static_viewer -from mitmproxy.addons import save +from mitmproxy.addons import save, readfile def test_save_static(tmpdir): @@ -59,8 +59,9 @@ def test_save_flows_content(ctx, tmpdir): def test_static_viewer(tmpdir): s = static_viewer.StaticViewer() + rf = readfile.ReadFile() sa = save.Save() - with taddons.context() as tctx: + with taddons.context(rf) as tctx: sa.save([tflow.tflow(resp=True)], str(tmpdir.join('foo'))) tctx.master.addons.add(s) tctx.configure(s, web_static_viewer=str(tmpdir), rfile=str(tmpdir.join('foo'))) -- cgit v1.2.3