aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_console_help.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-03-19 11:40:53 +1300
committerAldo Cortesi <aldo@nullcube.com>2015-03-19 11:40:53 +1300
commitb77e511fca5d1de3c744592a347ecce45e9526bb (patch)
tree5e3077498b78bd3b52e6341b461acbc5cb833054 /test/test_console_help.py
parent5721e5bd27d433bf5114b5e18e2042d619eee09f (diff)
parent7c75f4d0db3c78116cb14e1912708f7751de3f21 (diff)
downloadmitmproxy-b77e511fca5d1de3c744592a347ecce45e9526bb.tar.gz
mitmproxy-b77e511fca5d1de3c744592a347ecce45e9526bb.tar.bz2
mitmproxy-b77e511fca5d1de3c744592a347ecce45e9526bb.zip
Merge pull request #526 from tekii/fix-522
fix for #522
Diffstat (limited to 'test/test_console_help.py')
-rw-r--r--test/test_console_help.py10
1 files changed, 9 insertions, 1 deletions
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"