aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/test_command.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/mitmproxy/test_command.py')
-rw-r--r--test/mitmproxy/test_command.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/test/mitmproxy/test_command.py b/test/mitmproxy/test_command.py
index 5218042c..b4711236 100644
--- a/test/mitmproxy/test_command.py
+++ b/test/mitmproxy/test_command.py
@@ -66,8 +66,22 @@ class TestCommand:
def test_parse_partial(self):
tests = [
- ["foo bar", [("foo", command.Cmd), ("bar", str)]],
- ["foo 'bar", [("foo", command.Cmd), ("'bar", str)]],
+ [
+ "foo bar",
+ [
+ command.ParseResult(value = "foo", type = command.Cmd),
+ command.ParseResult(value = "bar", type = str)
+ ],
+ ],
+ [
+ "foo 'bar",
+ [
+ command.ParseResult(value = "foo", type = command.Cmd),
+ command.ParseResult(value = "'bar", type = str)
+ ]
+ ],
+ ["a", [command.ParseResult(value = "a", type = command.Cmd)]],
+ ["", [command.ParseResult(value = "", type = command.Cmd)]],
]
with taddons.context() as tctx:
cm = command.CommandManager(tctx.master)