aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_console_help.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-03-19 16:18:41 +0100
committerMaximilian Hils <git@maximilianhils.com>2015-03-19 16:18:41 +0100
commit51856b7ccde424828dfb6f12b186478cd07f4dd8 (patch)
tree57a51cb6f98fd1d23c5329f8a458d29a3d5e200c /test/test_console_help.py
parenta2cbfb117b5b92b4c756ad6054deec76ce6f807d (diff)
parentb47019293e49f85186bc7a7c8e71ab4c253b7d99 (diff)
downloadmitmproxy-51856b7ccde424828dfb6f12b186478cd07f4dd8.tar.gz
mitmproxy-51856b7ccde424828dfb6f12b186478cd07f4dd8.tar.bz2
mitmproxy-51856b7ccde424828dfb6f12b186478cd07f4dd8.zip
Merge branch 'master' of github.com:mitmproxy/mitmproxy
Diffstat (limited to 'test/test_console_help.py')
-rw-r--r--test/test_console_help.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/test_console_help.py b/test/test_console_help.py
index 6e1f9fad..a410bd2e 100644
--- a/test/test_console_help.py
+++ b/test/test_console_help.py
@@ -5,7 +5,14 @@ if os.name == "nt":
import libmproxy.console.help as help
+class DummyLoop:
+ def __init__(self):
+ self.widget = None
+
class DummyMaster:
+ def __init__(self):
+ self.loop = DummyLoop()
+
def make_view(self):
pass
@@ -16,7 +23,8 @@ class TestHelp:
assert h.helptext()
def test_keypress(self):
- h = help.HelpView(DummyMaster(), "foo", [1, 2, 3])
+ master = DummyMaster()
+ h = help.HelpView(master, "foo", [1, 2, 3])
assert not h.keypress((0, 0), "q")
assert not h.keypress((0, 0), "?")
assert h.keypress((0, 0), "o") == "o"