aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkira0204 <rshtmudgal@gmail.com>2018-03-12 09:13:29 +0530
committerkira0204 <rshtmudgal@gmail.com>2018-03-12 09:13:29 +0530
commit8aad2d63cfaf30204464fcfee4ecf6f159a8f731 (patch)
tree1ec11786b1136351036002fc11a0c320ec253b61 /test
parent5dcc3b4ff832f817fc621d9116f1b399eb2ff137 (diff)
downloadmitmproxy-8aad2d63cfaf30204464fcfee4ecf6f159a8f731.tar.gz
mitmproxy-8aad2d63cfaf30204464fcfee4ecf6f159a8f731.tar.bz2
mitmproxy-8aad2d63cfaf30204464fcfee4ecf6f159a8f731.zip
adding command
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_command.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/mitmproxy/test_command.py b/test/mitmproxy/test_command.py
index 32498578..3d0a43f8 100644
--- a/test/mitmproxy/test_command.py
+++ b/test/mitmproxy/test_command.py
@@ -318,6 +318,10 @@ class TCmds(TAttr):
def __init__(self):
self.TAttr = TAttr()
+ @command.command("empty")
+ def empty(self) -> None:
+ pass
+
def test_collect_commands():
"""
@@ -327,9 +331,7 @@ def test_collect_commands():
c = command.CommandManager(tctx.master)
a = TCmds()
c.collect_commands(a)
- assert "cmd1" not in c.commands
- assert "cmd2" not in c.commands
- assert "empty" not in c.commands
+ assert "empty" in c.commands
def test_decorator():