MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_invalid_cookies

Method test_invalid_cookies

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

Source from the content-addressed store, hash-verified

284 """)
285
286 def test_invalid_cookies(self):
287 # Accepting these could be a security issue
288 C = cookies.SimpleCookie()
289 for s in (']foo=x', '[foo=x', 'blah]foo=x', 'blah[foo=x',
290 'Set-Cookie: foo=bar', 'Set-Cookie: foo',
291 'foo=bar; baz', 'baz; foo=bar',
292 'secure;foo=bar', 'Version=1;foo=bar'):
293 C.load(s)
294 self.assertEqual(dict(C), {})
295 self.assertEqual(C.output(), '')
296
297 def test_pickle(self):
298 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