MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_remove

Function test_remove

test/mitmproxy/tools/console/test_keymap.py:62–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60
61
62def test_remove():
63 with taddons.context() as tctx:
64 km = keymap.Keymap(tctx.master)
65 km.add("key", "str", ["options", "commands"], "help1")
66 assert len(km.bindings) == 1
67 assert "options" in km.bindings[0].contexts
68
69 km.remove("key", ["options"])
70 assert len(km.bindings) == 1
71 assert "options" not in km.bindings[0].contexts
72
73 km.remove("key", ["commands"])
74 assert len(km.bindings) == 0
75
76
77def test_load_path(tmpdir):

Callers

nothing calls this directly

Calls 3

addMethod · 0.95
removeMethod · 0.95
contextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…