diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/tools/console/test_commander.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/mitmproxy/tools/console/test_commander.py b/test/mitmproxy/tools/console/test_commander.py index 2a96995d..cc2f3f35 100644 --- a/test/mitmproxy/tools/console/test_commander.py +++ b/test/mitmproxy/tools/console/test_commander.py @@ -1,4 +1,4 @@ - +from mitmproxy import options from mitmproxy.tools.console.commander import commander from mitmproxy.test import taddons @@ -96,3 +96,11 @@ class TestCommandBuffer: with taddons.context() as tctx: cb = commander.CommandBuffer(tctx.master) assert cb.flatten("foo bar") == "foo bar" + + def test_get_option_value(self): + opts = options.Options(view_filter="value") + with taddons.context(options=opts) as tctx: + cb = commander.CommandBuffer(tctx.master) + assert cb.get_option_value("set unknown_option=") == "" + assert cb.get_option_value("set intercept=") == "" + assert cb.get_option_value("set view_filter=") == "value" |