diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-08-19 00:14:16 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-08-19 00:14:16 +1200 |
commit | 1b7990897e57df2d095e6eb06aa6c27bc81195ba (patch) | |
tree | 7179f690468f6644bd194f78350308b56b18e955 /test/test_cmdline.py | |
parent | 3e96015e61072902941291bda56cea8c2e3b3d4b (diff) | |
download | mitmproxy-1b7990897e57df2d095e6eb06aa6c27bc81195ba.tar.gz mitmproxy-1b7990897e57df2d095e6eb06aa6c27bc81195ba.tar.bz2 mitmproxy-1b7990897e57df2d095e6eb06aa6c27bc81195ba.zip |
Command-line options for header setting.
Diffstat (limited to 'test/test_cmdline.py')
-rw-r--r-- | test/test_cmdline.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/test_cmdline.py b/test/test_cmdline.py index 06b3abc9..0a1d6e8f 100644 --- a/test/test_cmdline.py +++ b/test/test_cmdline.py @@ -14,7 +14,7 @@ def test_parse_replace_hook(): assert x == (".*", "bar", "voing") tutils.raises( - cmdline.ParseReplaceException, + cmdline.ParseException, cmdline.parse_replace_hook, "/foo" ) @@ -29,11 +29,17 @@ def test_parse_replace_hook(): "/~/foo/rep" ) tutils.raises( - "empty replacement regex", + "empty clause", cmdline.parse_replace_hook, "//" ) + +def test_parse_setheaders(): + x = cmdline.parse_replace_hook("/foo/bar/voing") + assert x == ("foo", "bar", "voing") + + def test_common(): parser = argparse.ArgumentParser() cmdline.common_options(parser) @@ -53,7 +59,7 @@ def test_common(): opts.replace = ["//"] tutils.raises( - "empty replacement regex", + "empty clause", cmdline.get_common_options, opts ) |