aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/console/test_help.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/mitmproxy/console/test_help.py')
-rw-r--r--test/mitmproxy/console/test_help.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/mitmproxy/console/test_help.py b/test/mitmproxy/console/test_help.py
new file mode 100644
index 00000000..3c1cc57c
--- /dev/null
+++ b/test/mitmproxy/console/test_help.py
@@ -0,0 +1,16 @@
+import mitmproxy.console.help as help
+from .. import tutils
+
+
+@tutils.skip_appveyor
+class TestHelp:
+
+ def test_helptext(self):
+ h = help.HelpView(None)
+ assert h.helptext()
+
+ def test_keypress(self):
+ h = help.HelpView([1, 2, 3])
+ assert not h.keypress((0, 0), "q")
+ assert not h.keypress((0, 0), "?")
+ assert h.keypress((0, 0), "o") == "o"