diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-02-15 16:34:22 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-02-15 16:34:22 +0100 |
commit | d7158f975e671b78f0a064dd873cfa7805667528 (patch) | |
tree | 9b40f263c4f613a0dc49f5d8628c371164afd546 /test/mitmproxy/test_console_help.py | |
parent | 5fe473fb431699c71aa74bb715c2cb5b0500f044 (diff) | |
download | mitmproxy-d7158f975e671b78f0a064dd873cfa7805667528.tar.gz mitmproxy-d7158f975e671b78f0a064dd873cfa7805667528.tar.bz2 mitmproxy-d7158f975e671b78f0a064dd873cfa7805667528.zip |
move tests into shared folder
Diffstat (limited to 'test/mitmproxy/test_console_help.py')
-rw-r--r-- | test/mitmproxy/test_console_help.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/mitmproxy/test_console_help.py b/test/mitmproxy/test_console_help.py new file mode 100644 index 00000000..f1a71faf --- /dev/null +++ b/test/mitmproxy/test_console_help.py @@ -0,0 +1,19 @@ +import os +from unittest.case import SkipTest +if os.name == "nt": + raise SkipTest("Skipped on Windows.") + +import libmproxy.console.help as help + + +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" |