MCPcopy Index your code
hub / github.com/python/cpython / test_invalid_cookies

Method test_invalid_cookies

Lib/test/test_http_cookies.py:308–317  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

306 """)
307
308 def test_invalid_cookies(self):
309 # Accepting these could be a security issue
310 C = cookies.SimpleCookie()
311 for s in (']foo=x', '[foo=x', 'blah]foo=x', 'blah[foo=x',
312 'Set-Cookie: foo=bar', 'Set-Cookie: foo',
313 'foo=bar; baz', 'baz; foo=bar',
314 'secure;foo=bar', 'Version=1;foo=bar'):
315 C.load(s)
316 self.assertEqual(dict(C), {})
317 self.assertEqual(C.output(), '')
318
319 def test_pickle(self):
320 rawdata = 'Customer="WILE_E_COYOTE"; Path=/acme; Version=1'

Callers

nothing calls this directly

Calls 3

loadMethod · 0.45
assertEqualMethod · 0.45
outputMethod · 0.45

Tested by

no test coverage detected