Lines Matching +full:path +full:- +full:key
18 'output': 'Set-Cookie: chips=ahoy\nSet-Cookie: vienna=finger'},
23 'output': 'Set-Cookie: keebler="E=mc2; L=\\"Loves\\"; fudge=\\012;"'},
29 'output': 'Set-Cookie: keebler=E=mc2'},
34 {'data': 'key:term=value:term',
35 'dict': {'key:term' : 'value:term'},
36 'repr': "<SimpleCookie: key:term='value:term'>",
37 'output': 'Set-Cookie: key:term=value:term'},
39 # issue22931 - Adding '[' and ']' as valid characters in cookie
46 'Set-Cookie: a=b',
47 'Set-Cookie: c=[',
48 'Set-Cookie: d=r',
49 'Set-Cookie: f=h'
96 self.assertEqual(value[-2:], '\\;')
101 C.load('Customer="WILE_E_COYOTE"; Version=1; Path=/acme')
105 self.assertEqual(C['Customer']['path'], '/acme')
107 self.assertEqual(C.output(['path']),
108 'Set-Cookie: Customer="WILE_E_COYOTE"; Path=/acme')
111 <!-- begin hiding
112 document.cookie = "Customer=\"WILE_E_COYOTE\"; Path=/acme; Version=1";
113 // end hiding -->
116 self.assertEqual(C.js_output(['path']), r"""
118 <!-- begin hiding
119 document.cookie = "Customer=\"WILE_E_COYOTE\"; Path=/acme";
120 // end hiding -->
130 'Set-Cookie: val="some\\054funky\\073stuff"')
149 # 'max-age'
151 C['Customer']['max-age'] = 10
153 'Set-Cookie: Customer="WILE_E_COYOTE"; Max-Age=10')
160 'Set-Cookie: Customer="WILE_E_COYOTE"; HttpOnly; Secure')
169 'Set-Cookie: Customer="WILE_E_COYOTE"; SameSite=%s' % val)
177 C.load('eggs=scrambled; Path=/bacon')
184 C.load('eggs=scrambled; httponly; secure; Path=/bacon')
192 C.load('eggs=scrambled; httponly=foo; secure=bar; Path=/bacon')
202 C.load('eggs = scrambled ; secure ; path = bar ; foo=foo ')
204 'Set-Cookie: eggs=scrambled; Path=bar; Secure\r\nSet-Cookie: foo=foo')
207 # Try cookie with quoted meta-data
209 C.load('Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"')
212 self.assertEqual(C['Customer']['path'], '/acme')
214 self.assertEqual(C.output(['path']),
215 'Set-Cookie: Customer="WILE_E_COYOTE"; Path=/acme')
218 <!-- begin hiding
219 document.cookie = "Customer=\"WILE_E_COYOTE\"; Path=/acme; Version=1";
220 // end hiding -->
223 self.assertEqual(C.js_output(['path']), r"""
225 <!-- begin hiding
226 document.cookie = "Customer=\"WILE_E_COYOTE\"; Path=/acme";
227 // end hiding -->
235 'Set-Cookie: foo=bar', 'Set-Cookie: foo',
243 rawdata = 'Customer="WILE_E_COYOTE"; Path=/acme; Version=1'
244 expected_output = 'Set-Cookie: %s' % rawdata
264 self.assertEqual(str(c['foo']), 'Set-Cookie: foo="\\251"')
268 'Set-Cookie: foo="\\251"; Comment="comment \\251"'
277 self.assertIsNone(morsel.key)
281 for key, val in morsel.items():
282 self.assertEqual(val, '', key)
292 # Test that valid key values come out fine
306 for i in "thou cast _the- !holy! ^hand| +*grenade~".split():
309 M['path'] = '/foo' # Try a reserved key as well
311 self.assertEqual(M.key, i)
316 "Set-Cookie: %s=%s; Path=/foo" % (i, "%s_coded_val" % i))
319 <!-- begin hiding
320 document.cookie = "%s=%s; Path=/foo";
321 // end hiding -->
333 morsel.key = ''
340 base_case = ('key', 'value', '"value"')
342 'path': '/',
356 ('key', 'value', 'mismatch'),
357 ('key', 'mismatch', '"value"'),
483 self.assertEqual(str(morsel), 'Set-Cookie: None=None')
484 morsel.set('key', 'val', 'coded_val')
485 self.assertEqual(repr(morsel), '<Morsel: key=coded_val>')
486 self.assertEqual(str(morsel), 'Set-Cookie: key=coded_val')
488 'path': '/',
491 'max-age': 0,
496 '<Morsel: key=coded_val; Comment=foo; Domain=example.com; '
497 'Max-Age=0; Path=/; Version=1>')
499 'Set-Cookie: key=coded_val; Comment=foo; Domain=example.com; '
500 'Max-Age=0; Path=/; Version=1')
504 '<Morsel: key=coded_val; Comment=foo; Domain=example.com; '
505 'HttpOnly; Max-Age=0; Path=/; Secure; Version=1>')
507 'Set-Cookie: key=coded_val; Comment=foo; Domain=example.com; '
508 'HttpOnly; Max-Age=0; Path=/; Secure; Version=1')
511 morsel.set('key', 'val', 'coded_val')
514 r'<Morsel: key=coded_val; '
517 r'Set-Cookie: key=coded_val; '