aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/test_console_help.py
blob: 0589bd68cd7d019b26efc0476834803245f05cdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os
from unittest.case import SkipTest
if os.name == "nt":
    raise SkipTest("Skipped on Windows.")

import mitmproxy.console.help as help


class TestHelp:

    def test_helptext(self):
        h = help.HelpView(None)
        assert h.helptext()

    def test_keypress(self):
        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"