diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2014-11-15 17:25:05 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2014-11-15 17:25:05 +1300 |
commit | 09c503563ad2e42812bf8043aedd9ecf980babf6 (patch) | |
tree | bed424aa1e606631c8e69c3f9f8c2623e56a6f50 /test/test_cmdline.py | |
parent | 6c1dc4522d7bf83c7b6c289f11f5a33d5b9a018f (diff) | |
download | mitmproxy-09c503563ad2e42812bf8043aedd9ecf980babf6.tar.gz mitmproxy-09c503563ad2e42812bf8043aedd9ecf980babf6.tar.bz2 mitmproxy-09c503563ad2e42812bf8043aedd9ecf980babf6.zip |
Enable config file parsing
We support 4 different config files:
~/.mitmproxy/common.conf: Options that are common to all tools
~/.mitmproxy/mitmproxy.conf: Options for mitmproxy
~/.mitmproxy/mitmdump.conf: Options for mitmdump
~/.mitmproxy/mitmweb.conf: Options for mitmweb
Options in the tool-specific config files over-ride options in common.conf. If
a non-common option is put in common.conf, an error will be raised if a
non-supporting tool is used.
Diffstat (limited to 'test/test_cmdline.py')
-rw-r--r-- | test/test_cmdline.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/test_cmdline.py b/test/test_cmdline.py index 12e8aa89..476fc620 100644 --- a/test/test_cmdline.py +++ b/test/test_cmdline.py @@ -1,7 +1,6 @@ import argparse from libmproxy import cmdline import tutils -import os.path def test_parse_replace_hook(): @@ -51,6 +50,7 @@ def test_parse_setheaders(): x = cmdline.parse_setheader("/foo/bar/voing") assert x == ("foo", "bar", "voing") + def test_common(): parser = argparse.ArgumentParser() cmdline.common_options(parser) @@ -108,3 +108,19 @@ def test_common(): assert len(v) == 1 assert v[0][2].strip() == "replacecontents" + +def test_mitmproxy(): + ap = cmdline.mitmproxy() + assert ap + + +def test_mitmdump(): + ap = cmdline.mitmdump() + assert ap + + +def test_mitmweb(): + ap = cmdline.mitmweb() + assert ap + + |