summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-05-23 15:38:48 (GMT)
committerBenjamin Peterson <benjamin@python.org>2015-05-23 15:38:48 (GMT)
commitd504f20e1c30d7ee328e897e1bb93cba3d1db7a2 (patch)
tree2fbb319282a937ba1bb3d6c332237006f057060f /Lib/test
parentdeff2b76ec3824ff238ad0812c29aca95534ecb4 (diff)
parent9bd476ea57e1f77c5d117577d721bff806137a09 (diff)
downloadcpython-d504f20e1c30d7ee328e897e1bb93cba3d1db7a2.zip
cpython-d504f20e1c30d7ee328e897e1bb93cba3d1db7a2.tar.gz
cpython-d504f20e1c30d7ee328e897e1bb93cba3d1db7a2.tar.bz2
merge 3.2 (#22931)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_http_cookies.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_http_cookies.py b/Lib/test/test_http_cookies.py
index 76e5e9c..8d7c220 100644
--- a/Lib/test/test_http_cookies.py
+++ b/Lib/test/test_http_cookies.py
@@ -43,6 +43,19 @@ class CookieTests(unittest.TestCase):
'repr': "<SimpleCookie: key:term='value:term'>",
'output': 'Set-Cookie: key:term=value:term'},
+ # issue22931 - Adding '[' and ']' as valid characters in cookie
+ # values as defined in RFC 6265
+ {
+ 'data': 'a=b; c=[; d=r; f=h',
+ 'dict': {'a':'b', 'c':'[', 'd':'r', 'f':'h'},
+ 'repr': "<SimpleCookie: a='b' c='[' d='r' f='h'>",
+ 'output': '\n'.join((
+ 'Set-Cookie: a=b',
+ 'Set-Cookie: c=[',
+ 'Set-Cookie: d=r',
+ 'Set-Cookie: f=h'
+ ))
+ }
]
for case in cases: