• Home
  • Raw
  • Download

Lines Matching +full:set +full:- +full:version

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'},
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')
104 self.assertEqual(C['Customer']['version'], '1')
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 -->
118 <!-- begin hiding
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)
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"')
211 self.assertEqual(C['Customer']['version'], '1')
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 -->
225 <!-- begin hiding
227 // end hiding -->
235 'Set-Cookie: foo=bar', 'Set-Cookie: foo',
237 'secure;foo=bar', 'Version=1;foo=bar'):
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"'
288 # Test that all valid keys are reported as reserved and set them
301 # tests the .set method to set keys and their values
303 # Makes sure that all reserved keys can't be set this way
305 M.set, i, '%s_value' % i, '%s_value' % i)
306 for i in "thou cast _the- !holy! ^hand| +*grenade~".split():
310 M.set(i, "%s_val" % i, "%s_coded_val" % i)
316 "Set-Cookie: %s=%s; Path=/foo" % (i, "%s_coded_val" % i))
319 <!-- begin hiding
321 // end hiding -->
328 M.set, i, '%s_value' % i, '%s_value' % i)
345 'version': 2,
349 morsel_a.set(*base_case)
352 morsel_b.set(*base_case)
364 morsel_b.set(*case_b)
370 morsel_b.set(*base_case)
386 morsel.set(*base_case)
393 morsel_a.set('foo', 'bar', 'baz')
395 'version': 2,
412 morsel['Version'] = 2
413 self.assertEqual(morsel['version'], 2)
425 'version': 2,
430 self.assertEqual(morsel.setdefault('Version', 1), 2)
431 self.assertEqual(morsel['version'], 2)
440 attribs = {'expires': 1, 'Version': 2, 'DOMAIN': 'example.com'}
445 self.assertEqual(morsel['version'], 2)
451 self.assertEqual(morsel['version'], 2)
457 self.assertEqual(morsel['version'], 2)
468 morsel_a.set('foo', 'bar', 'baz')
470 'version': 2,
483 self.assertEqual(str(morsel), 'Set-Cookie: None=None')
484 morsel.set('key', 'val', 'coded_val')
486 self.assertEqual(str(morsel), 'Set-Cookie: key=coded_val')
491 'max-age': 0,
493 'version': 1,
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')
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')
517 r'Set-Cookie: key=coded_val; '