diff options
author | Matthew Shao <me@matshao.com> | 2017-08-01 08:42:51 +0800 |
---|---|---|
committer | Matthew Shao <me@matshao.com> | 2017-08-01 08:42:51 +0800 |
commit | 2ceaa5c9efd3bbbb7fdb6b0d3ebdb8de32305f92 (patch) | |
tree | 6458c1fb3ab4b6d96d8c246781c8959c9e654872 /test | |
parent | 2aa97c9b75989e20faf475fed5da1363e8bed87b (diff) | |
download | mitmproxy-2ceaa5c9efd3bbbb7fdb6b0d3ebdb8de32305f92.tar.gz mitmproxy-2ceaa5c9efd3bbbb7fdb6b0d3ebdb8de32305f92.tar.bz2 mitmproxy-2ceaa5c9efd3bbbb7fdb6b0d3ebdb8de32305f92.zip |
Update tests.
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/addons/test_view.py | 12 | ||||
-rw-r--r-- | test/mitmproxy/tools/console/test_statusbar.py | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/test/mitmproxy/addons/test_view.py b/test/mitmproxy/addons/test_view.py index e8eeb591..9a9534f9 100644 --- a/test/mitmproxy/addons/test_view.py +++ b/test/mitmproxy/addons/test_view.py @@ -7,6 +7,10 @@ from mitmproxy import flowfilter from mitmproxy import exceptions from mitmproxy import io from mitmproxy.test import taddons +from mitmproxy import options +from mitmproxy.tools.console.master import ConsoleMaster + +m = ConsoleMaster(options.Options()) def tft(*, method="get", start=0): @@ -26,7 +30,7 @@ def test_order_refresh(): v.sig_view_refresh.connect(save) tf = tflow.tflow(resp=True) - with taddons.context() as tctx: + with taddons.context(m) as tctx: tctx.configure(v, console_order="time") v.add([tf]) tf.request.timestamp_start = 1 @@ -293,7 +297,7 @@ def test_setgetval(): def test_order(): v = view.View() - with taddons.context() as tctx: + with taddons.context(m) as tctx: v.request(tft(method="get", start=1)) v.request(tft(method="put", start=2)) v.request(tft(method="get", start=3)) @@ -424,7 +428,7 @@ def test_signals(): def test_focus_follow(): v = view.View() - with taddons.context() as tctx: + with taddons.context(m) as tctx: tctx.configure(v, console_focus_follow=True, view_filter="~m get") v.add([tft(start=5)]) @@ -541,7 +545,7 @@ def test_settings(): def test_configure(): v = view.View() - with taddons.context() as tctx: + with taddons.context(m) as tctx: tctx.configure(v, view_filter="~q") with pytest.raises(Exception, match="Invalid interception filter"): tctx.configure(v, view_filter="~~") diff --git a/test/mitmproxy/tools/console/test_statusbar.py b/test/mitmproxy/tools/console/test_statusbar.py index 2f7825c9..34981e42 100644 --- a/test/mitmproxy/tools/console/test_statusbar.py +++ b/test/mitmproxy/tools/console/test_statusbar.py @@ -13,14 +13,12 @@ def test_statusbar(monkeypatch): stickycookie="~dst example.com", stickyauth="~dst example.com", default_contentview="javascript", - console_order="url", anticache=True, anticomp=True, showhost=True, refresh_server_playback=False, replay_kill_extra=True, upstream_cert=False, - console_focus_follow=True, stream_large_bodies="3m", mode="transparent", scripts=["nonexistent"], |