diff options
author | ColdFire <9128903+fenilgandhi@users.noreply.github.com> | 2018-02-23 00:27:10 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-23 00:27:10 +0530 |
commit | 777cb98a86f3e8883383935661e2ed20ed9b6bd4 (patch) | |
tree | 67d3e1259dccb83866496f45fe20ac3bd76961ce /test | |
parent | 6bf250aa3e8ede84d16170d95728c6488444a5a8 (diff) | |
parent | 58ccad7576e5fd33e937aba58df2f9edc389e52e (diff) | |
download | mitmproxy-777cb98a86f3e8883383935661e2ed20ed9b6bd4.tar.gz mitmproxy-777cb98a86f3e8883383935661e2ed20ed9b6bd4.tar.bz2 mitmproxy-777cb98a86f3e8883383935661e2ed20ed9b6bd4.zip |
Merge branch 'master' into issue-2872
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/addons/test_serverplayback.py | 6 | ||||
-rw-r--r-- | test/mitmproxy/contentviews/test_api.py | 13 | ||||
-rw-r--r-- | test/mitmproxy/tools/console/test_master.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/tools/console/test_statusbar.py | 4 |
4 files changed, 6 insertions, 19 deletions
diff --git a/test/mitmproxy/addons/test_serverplayback.py b/test/mitmproxy/addons/test_serverplayback.py index 7605a5d9..32249a88 100644 --- a/test/mitmproxy/addons/test_serverplayback.py +++ b/test/mitmproxy/addons/test_serverplayback.py @@ -331,7 +331,7 @@ def test_server_playback_full(): with taddons.context() as tctx: tctx.configure( s, - refresh_server_playback = True, + server_replay_refresh = True, ) f = tflow.tflow() @@ -363,8 +363,8 @@ def test_server_playback_kill(): with taddons.context() as tctx: tctx.configure( s, - refresh_server_playback = True, - replay_kill_extra=True + server_replay_refresh = True, + server_replay_kill_extra=True ) f = tflow.tflow() diff --git a/test/mitmproxy/contentviews/test_api.py b/test/mitmproxy/contentviews/test_api.py index c072c86f..3fc06d7c 100644 --- a/test/mitmproxy/contentviews/test_api.py +++ b/test/mitmproxy/contentviews/test_api.py @@ -9,7 +9,6 @@ from mitmproxy.test import tutils class TestContentView(contentviews.View): name = "test" - prompt = ("test", "t") content_types = ["test/123"] @@ -22,13 +21,6 @@ def test_add_remove(): with pytest.raises(ContentViewException, match="Duplicate view"): contentviews.add(tcv) - tcv2 = TestContentView() - tcv2.name = "test2" - tcv2.prompt = ("test2", "t") - # Same shortcut doesn't work either. - with pytest.raises(ContentViewException, match="Duplicate view shortcut"): - contentviews.add(tcv2) - contentviews.remove(tcv) assert tcv not in contentviews.views @@ -86,8 +78,3 @@ def test_get_message_content_view(): r.content = None desc, lines, err = contentviews.get_message_content_view("raw", r) assert list(lines) == [[("error", "content missing")]] - - -def test_get_by_shortcut(): - assert contentviews.get_by_shortcut("s") - assert not contentviews.get_by_shortcut("b") diff --git a/test/mitmproxy/tools/console/test_master.py b/test/mitmproxy/tools/console/test_master.py index 9779a482..6f46ce9e 100644 --- a/test/mitmproxy/tools/console/test_master.py +++ b/test/mitmproxy/tools/console/test_master.py @@ -8,7 +8,7 @@ from ... import tservers def test_options(): - assert options.Options(replay_kill_extra=True) + assert options.Options(server_replay_kill_extra=True) class TestMaster(tservers.MasterTest): diff --git a/test/mitmproxy/tools/console/test_statusbar.py b/test/mitmproxy/tools/console/test_statusbar.py index b131a5d3..8522eb96 100644 --- a/test/mitmproxy/tools/console/test_statusbar.py +++ b/test/mitmproxy/tools/console/test_statusbar.py @@ -16,8 +16,8 @@ def test_statusbar(monkeypatch): anticache=True, anticomp=True, showhost=True, - refresh_server_playback=False, - replay_kill_extra=True, + server_replay_refresh=False, + server_replay_kill_extra=True, upstream_cert=False, stream_large_bodies="3m", mode="transparent", |