diff options
Diffstat (limited to 'test/test_console_help.py')
-rw-r--r-- | test/test_console_help.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/test_console_help.py b/test/test_console_help.py index 6e1f9fad..24517439 100644 --- a/test/test_console_help.py +++ b/test/test_console_help.py @@ -5,18 +5,26 @@ 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 class TestHelp: def test_helptext(self): - h = help.HelpView(None, "foo", None) + h = help.HelpView(None) assert h.helptext() def test_keypress(self): - h = help.HelpView(DummyMaster(), "foo", [1, 2, 3]) + master = DummyMaster() + 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" |