diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/test_proxy.py | 3 | ||||
-rw-r--r-- | test/mitmproxy/tools/test_cmdline.py | 10 |
2 files changed, 4 insertions, 9 deletions
diff --git a/test/mitmproxy/test_proxy.py b/test/mitmproxy/test_proxy.py index 784a7d84..6afda18c 100644 --- a/test/mitmproxy/test_proxy.py +++ b/test/mitmproxy/test_proxy.py @@ -6,6 +6,7 @@ import pytest from mitmproxy.tools import cmdline +from mitmproxy.tools import main from mitmproxy import options from mitmproxy.proxy import ProxyConfig from mitmproxy.proxy.server import DummyServer, ProxyServer, ConnectionHandler @@ -33,7 +34,7 @@ class TestProcessProxyOptions: opts = options.Options() cmdline.common_options(parser, opts) args = parser.parse_args(args=args) - opts.merge(cmdline.get_common_options(args)) + main.process_options(parser, opts, args) pconf = config.ProxyConfig(opts) return parser, pconf diff --git a/test/mitmproxy/tools/test_cmdline.py b/test/mitmproxy/tools/test_cmdline.py index bae68f83..65cfeb07 100644 --- a/test/mitmproxy/tools/test_cmdline.py +++ b/test/mitmproxy/tools/test_cmdline.py @@ -1,5 +1,6 @@ import argparse from mitmproxy.tools import cmdline +from mitmproxy.tools import main from mitmproxy import options @@ -8,14 +9,7 @@ def test_common(): opts = options.Options() cmdline.common_options(parser, opts) args = parser.parse_args(args=[]) - - assert cmdline.get_common_options(args) - - args.stickycookie = "foo" - args.stickyauth = "foo" - v = cmdline.get_common_options(args) - assert v["stickycookie"] == "foo" - assert v["stickyauth"] == "foo" + assert main.process_options(parser, opts, args) def test_mitmproxy(): |