Fix unit tests

This commit is contained in:
Aldo Cortesi 2015-03-22 17:23:27 +13:00
parent 08bb076533
commit a1c21d9774

View File

@ -19,12 +19,12 @@ class DummyMaster:
class TestHelp:
def test_helptext(self):
h = help.HelpView(None, "foo", None)
h = help.HelpView(None)
assert h.helptext()
def test_keypress(self):
master = DummyMaster()
h = help.HelpView(master, "foo", [1, 2, 3])
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"