aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_console_help.py
blob: 98e202adb21379cbc6c667bd085f08dd998c8bdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import libmproxy.console.help as help

class DummyMaster:
    def make_view(self):
        pass


class TestHelp:
    def test_helptext(self):
        h = help.HelpView(None, "foo", None)
        assert h.helptext()

    def test_keypress(self):
        h = help.HelpView(DummyMaster(), "foo", [1, 2, 3])
        assert not h.keypress((0, 0), "q")
        assert not h.keypress((0, 0), "?")
        assert h.keypress((0, 0), "o") == "o"