From 7c75f4d0db3c78116cb14e1912708f7751de3f21 Mon Sep 17 00:00:00 2001 From: Marcelo Glezer Date: Wed, 18 Mar 2015 13:49:33 -0300 Subject: test/test_console_help.py fixed --- test/test_console_help.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test/test_console_help.py') 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" -- cgit v1.2.3