diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-02-24 16:47:58 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-24 16:47:58 +1300 |
commit | 3a766a420cb6fc0b1c9d0480e00b3250ec8a22c4 (patch) | |
tree | 4efe06cfc2a19ea6688915558b54c6c9075d94b4 /test | |
parent | 4fe83be63ca986754bcc9ab741c1fce3698a5053 (diff) | |
parent | 16dd7f3ddf012426f2ddcb5792cf35be528c6e09 (diff) | |
download | mitmproxy-3a766a420cb6fc0b1c9d0480e00b3250ec8a22c4.tar.gz mitmproxy-3a766a420cb6fc0b1c9d0480e00b3250ec8a22c4.tar.bz2 mitmproxy-3a766a420cb6fc0b1c9d0480e00b3250ec8a22c4.zip |
Merge branch 'master' into opts
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/net/http/test_cookies.py | 21 | ||||
-rw-r--r-- | test/mitmproxy/test_command.py | 16 |
2 files changed, 37 insertions, 0 deletions
diff --git a/test/mitmproxy/net/http/test_cookies.py b/test/mitmproxy/net/http/test_cookies.py index e12b0f00..74233cca 100644 --- a/test/mitmproxy/net/http/test_cookies.py +++ b/test/mitmproxy/net/http/test_cookies.py @@ -143,6 +143,27 @@ def test_cookie_roundtrips(): def test_parse_set_cookie_pairs(): pairs = [ [ + "=", + [[ + ["", ""] + ]] + ], + [ + "=;foo=bar", + [[ + ["", ""], + ["foo", "bar"] + ]] + ], + [ + "=;=;foo=bar", + [[ + ["", ""], + ["", ""], + ["foo", "bar"] + ]] + ], + [ "=uno", [[ ["", "uno"] diff --git a/test/mitmproxy/test_command.py b/test/mitmproxy/test_command.py index c777192d..e2b80753 100644 --- a/test/mitmproxy/test_command.py +++ b/test/mitmproxy/test_command.py @@ -211,6 +211,22 @@ class TestCommand: ], [] ], + [ + "flow \"one two", + [ + command.ParseResult(value = "flow", type = mitmproxy.types.Cmd, valid = True), + command.ParseResult(value = "\"one two", type = flow.Flow, valid = False), + ], + ["str"] + ], + [ + "flow \"one two\"", + [ + command.ParseResult(value = "flow", type = mitmproxy.types.Cmd, valid = True), + command.ParseResult(value = "one two", type = flow.Flow, valid = False), + ], + ["str"] + ], ] with taddons.context() as tctx: tctx.master.addons.add(TAddon()) |