aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-04-12 11:26:02 +1200
committerAldo Cortesi <aldo@nullcube.com>2015-04-12 11:30:35 +1200
commit2630da7263242411d413b5e4b2c520d29848c918 (patch)
tree8ee46f0e439653bfe33154d694b0fec9995c5499 /test
parent73ce169e3d11eeabeb78143bd86edfdbc3e07fd9 (diff)
downloadmitmproxy-2630da7263242411d413b5e4b2c520d29848c918.tar.gz
mitmproxy-2630da7263242411d413b5e4b2c520d29848c918.tar.bz2
mitmproxy-2630da7263242411d413b5e4b2c520d29848c918.zip
cookies: Cater for special values, fix some bugs found in real-world testing
Diffstat (limited to 'test')
-rw-r--r--test/test_http_cookies.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_http_cookies.py b/test/test_http_cookies.py
index b3f1f914..31e5f0b0 100644
--- a/test/test_http_cookies.py
+++ b/test/test_http_cookies.py
@@ -38,6 +38,10 @@ def test_read_pairs():
[["one", "two"]]
],
[
+ "one=",
+ [["one", ""]]
+ ],
+ [
'one="two"',
[["one", "two"]]
],
@@ -82,6 +86,10 @@ def test_pairs_roundtrips():
[["one", 'un"o']]
],
[
+ 'one="uno,due"',
+ [["one", 'uno,due']]
+ ],
+ [
"one=uno; two; three=tre",
[["one", "uno"], ["two", None], ["three", "tre"]]
],