diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-05-23 15:41:30 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-05-23 15:41:30 (GMT) |
commit | 5a69420062b3d85bbe7c434e81f54f4a4e1f0e2d (patch) | |
tree | 23238e5f32b9c68c3e7f4d5acda0970732083cda /Lib/test/test_http_cookies.py | |
parent | a48db2bc8b882e887fbe8a84b31828d8491dd877 (diff) | |
parent | c4ae86e47730a4466a8d6ebae4c5531bf1dfca3b (diff) | |
download | cpython-5a69420062b3d85bbe7c434e81f54f4a4e1f0e2d.zip cpython-5a69420062b3d85bbe7c434e81f54f4a4e1f0e2d.tar.gz cpython-5a69420062b3d85bbe7c434e81f54f4a4e1f0e2d.tar.bz2 |
merge 3.4 (#22931)
Diffstat (limited to 'Lib/test/test_http_cookies.py')
-rw-r--r-- | Lib/test/test_http_cookies.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_http_cookies.py b/Lib/test/test_http_cookies.py index cf0f6b9..d3e06a4 100644 --- a/Lib/test/test_http_cookies.py +++ b/Lib/test/test_http_cookies.py @@ -44,6 +44,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: |