Don't use : as an invalid cookie character

Since http://bugs.python.org/issue2193 has been resolved in favour of
the colon in cookie names, we need to test invalid cookie removal using
a different character. "@" is still considered invalid by all sources.
This commit is contained in:
Ian Clelland 2012-09-28 08:09:05 -07:00 committed by Luke Plant
parent 3629a159f9
commit 02dda22832
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ class RequestsTests(unittest.TestCase):
str_prefix("<WSGIRequest\npath:/otherpath/,\nGET:{%(_)s'a': %(_)s'b'},\nPOST:{%(_)s'c': %(_)s'd'},\nCOOKIES:{%(_)s'e': %(_)s'f'},\nMETA:{%(_)s'g': %(_)s'h'}>")) str_prefix("<WSGIRequest\npath:/otherpath/,\nGET:{%(_)s'a': %(_)s'b'},\nPOST:{%(_)s'c': %(_)s'd'},\nCOOKIES:{%(_)s'e': %(_)s'f'},\nMETA:{%(_)s'g': %(_)s'h'}>"))
def test_parse_cookie(self): def test_parse_cookie(self):
self.assertEqual(parse_cookie('invalid:key=true'), {}) self.assertEqual(parse_cookie('invalid@key=true'), {})
def test_httprequest_location(self): def test_httprequest_location(self):
request = HttpRequest() request = HttpRequest()