Lines Matching +full:set +full:- +full:output
17 'output': 'Set-Cookie: chips=ahoy\nSet-Cookie: vienna=finger'},
22 'output': 'Set-Cookie: keebler="E=mc2; L=\\"Loves\\"; fudge=\\012;"'},
28 'output': 'Set-Cookie: keebler=E=mc2'},
36 'output': 'Set-Cookie: key:term=value:term'},
38 # issue22931 - Adding '[' and ']' as valid characters in cookie
44 'output': '\n'.join((
45 'Set-Cookie: a=b',
46 'Set-Cookie: c=[',
47 'Set-Cookie: d=r',
48 'Set-Cookie: f=h'
57 self.assertEqual(C.output(sep='\n'), case['output'])
69 self.assertEqual(C.output(['path']),
70 'Set-Cookie: Customer="WILE_E_COYOTE"; Path=/acme')
73 <!-- begin hiding
75 // end hiding -->
80 <!-- begin hiding
82 // end hiding -->
91 self.assertEqual(C.output(['val']),
92 'Set-Cookie: val="some\\054funky\\073stuff"')
98 # can't test exact output, it always depends on current date/time
99 self.assertTrue(C.output().endswith('GMT'))
111 # 'max-age'
113 C['Customer']['max-age'] = 10
114 self.assertEqual(C.output(),
115 'Set-Cookie: Customer="WILE_E_COYOTE"; Max-Age=10')
121 self.assertEqual(C.output(),
122 'Set-Cookie: Customer="WILE_E_COYOTE"; HttpOnly; Secure')
130 self.assertEqual(C.output(),
131 'Set-Cookie: Customer="WILE_E_COYOTE"; SameSite=%s' % val)
165 self.assertEqual(C.output(),
166 'Set-Cookie: eggs=scrambled; Path=bar; Secure\r\nSet-Cookie: foo=foo')
169 # Try cookie with quoted meta-data
176 self.assertEqual(C.output(['path']),
177 'Set-Cookie: Customer="WILE_E_COYOTE"; Path=/acme')
180 <!-- begin hiding
182 // end hiding -->
187 <!-- begin hiding
189 // end hiding -->
197 'Set-Cookie: foo=bar', 'Set-Cookie: foo',
202 self.assertEqual(C.output(), '')
206 expected_output = 'Set-Cookie: %s' % rawdata
210 self.assertEqual(C.output(), expected_output)
215 self.assertEqual(C1.output(), expected_output)
226 self.assertEqual(str(c['foo']), 'Set-Cookie: foo="\\251"')
230 'Set-Cookie: foo="\\251"; Comment="comment \\251"'
250 # Test that all valid keys are reported as reserved and set them
263 # tests the .set method to set keys and their values
265 # Makes sure that all reserved keys can't be set this way
267 M.set, i, '%s_value' % i, '%s_value' % i)
268 for i in "thou cast _the- !holy! ^hand| +*grenade~".split():
270 # Check output and js_output.
272 M.set(i, "%s_val" % i, "%s_coded_val" % i)
277 M.output(),
278 "Set-Cookie: %s=%s; Path=/foo" % (i, "%s_coded_val" % i))
281 <!-- begin hiding
283 // end hiding -->
290 M.set, i, '%s_value' % i, '%s_value' % i)
311 morsel_a.set(*base_case)
314 morsel_b.set(*base_case)
326 morsel_b.set(*case_b)
332 morsel_b.set(*base_case)
348 morsel.set(*base_case)
355 morsel_a.set('foo', 'bar', 'baz')
430 morsel_a.set('foo', 'bar', 'baz')
445 self.assertEqual(str(morsel), 'Set-Cookie: None=None')
446 morsel.set('key', 'val', 'coded_val')
448 self.assertEqual(str(morsel), 'Set-Cookie: key=coded_val')
453 'max-age': 0,
459 'Max-Age=0; Path=/; Version=1>')
461 'Set-Cookie: key=coded_val; Comment=foo; Domain=example.com; '
462 'Max-Age=0; Path=/; Version=1')
467 'HttpOnly; Max-Age=0; Path=/; Secure; Version=1>')
469 'Set-Cookie: key=coded_val; Comment=foo; Domain=example.com; '
470 'HttpOnly; Max-Age=0; Path=/; Secure; Version=1')
473 morsel.set('key', 'val', 'coded_val')
479 r'Set-Cookie: key=coded_val; '