aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorHenrique <typoon@gmail.com>2019-11-16 17:01:47 -0500
committerHenrique <typoon@gmail.com>2019-11-16 17:01:47 -0500
commit7779eef572e8deeae895ea6d700265e6f9b432c8 (patch)
tree76763b3f6c98629d94376a12887608aef6a8f151 /test
parent373cc945c0fb15d0713166019ae0132f07c469e2 (diff)
downloadmitmproxy-7779eef572e8deeae895ea6d700265e6f9b432c8.tar.gz
mitmproxy-7779eef572e8deeae895ea6d700265e6f9b432c8.tar.bz2
mitmproxy-7779eef572e8deeae895ea6d700265e6f9b432c8.zip
Various changes to address PR comments
Made a change to make `CommandManager.execute` the main entry point for executing commands and made `call_strings` into a private method.
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/addons/test_save.py2
-rw-r--r--test/mitmproxy/tools/console/test_defaultkeys.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/mitmproxy/addons/test_save.py b/test/mitmproxy/addons/test_save.py
index 4aa1f648..6727a96f 100644
--- a/test/mitmproxy/addons/test_save.py
+++ b/test/mitmproxy/addons/test_save.py
@@ -73,7 +73,7 @@ def test_save_command(tmpdir):
v = view.View()
tctx.master.addons.add(v)
tctx.master.addons.add(sa)
- tctx.master.commands.call_strings("save.file", ["@shown", p])
+ tctx.master.commands.execute("save.file @shown %s" % p)
def test_simple(tmpdir):
diff --git a/test/mitmproxy/tools/console/test_defaultkeys.py b/test/mitmproxy/tools/console/test_defaultkeys.py
index 40e536b0..9c79525b 100644
--- a/test/mitmproxy/tools/console/test_defaultkeys.py
+++ b/test/mitmproxy/tools/console/test_defaultkeys.py
@@ -18,7 +18,7 @@ async def test_commands_exist():
await m.load_flow(tflow())
for binding in km.bindings:
- results = command_manager.parse_partial(binding.command)
+ results = command_manager.parse_partial(binding.command.strip())
cmd = results[0][0].value
args = [a.value for a in results[0][1:]]