Issue #26302: Correctly identify comma as an invalid character for a cookie (correcting regression in Python 3.5).

This commit is contained in:
Anish Shah 2016-02-07 05:36:00 +05:00
parent e14c07e4e4
commit 102d813b55
3 changed files with 10 additions and 1 deletions

View file

@ -210,6 +210,12 @@ class CookieTests(unittest.TestCase):
C1 = pickle.loads(pickle.dumps(C, protocol=proto))
self.assertEqual(C1.output(), expected_output)
def test_illegal_chars(self):
rawdata = "a=b; c,d=e"
C = cookies.SimpleCookie()
with self.assertRaises(cookies.CookieError):
C.load(rawdata)
class MorselTests(unittest.TestCase):
"""Tests for the Morsel object."""