diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2017-04-28 07:41:03 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2017-04-28 07:43:58 +1200 |
commit | 18edc1114592aa12fd7ce614b9757680594ca646 (patch) | |
tree | f6407a87cb9349d1fb503602c81600ec8658ab54 /test | |
parent | b73b06b3643555d9ef559574b60b405550b42bbb (diff) | |
download | mitmproxy-18edc1114592aa12fd7ce614b9757680594ca646.tar.gz mitmproxy-18edc1114592aa12fd7ce614b9757680594ca646.tar.bz2 mitmproxy-18edc1114592aa12fd7ce614b9757680594ca646.zip |
console: interactive command browser
Simple browser that lets users view and select commands interactively.
Key binding for this is still to be sorted out.
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/test_command.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/mitmproxy/test_command.py b/test/mitmproxy/test_command.py index 92d8c77b..b984bea6 100644 --- a/test/mitmproxy/test_command.py +++ b/test/mitmproxy/test_command.py @@ -12,6 +12,7 @@ import pytest class TAddon: def cmd1(self, foo: str) -> str: + """cmd1 help""" return "ret " + foo def cmd2(self, foo: str) -> str: @@ -40,6 +41,7 @@ def test_simple(): c = command.CommandManager(m) a = TAddon() c.add("one.two", a.cmd1) + assert c.commands["one.two"].help == "cmd1 help" assert(c.call("one.two foo") == "ret foo") with pytest.raises(exceptions.CommandError, match="Unknown"): c.call("nonexistent") |