This commit is contained in:
Benjamin Peterson 2015-05-23 10:38:48 -05:00
commit d504f20e1c
3 changed files with 19 additions and 3 deletions

View file

@ -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: