| 317 | self.assertEqual(C.output(), '') |
| 318 | |
| 319 | def test_pickle(self): |
| 320 | rawdata = 'Customer="WILE_E_COYOTE"; Path=/acme; Version=1' |
| 321 | expected_output = 'Set-Cookie: %s' % rawdata |
| 322 | |
| 323 | C = cookies.SimpleCookie() |
| 324 | C.load(rawdata) |
| 325 | self.assertEqual(C.output(), expected_output) |
| 326 | |
| 327 | for proto in range(pickle.HIGHEST_PROTOCOL + 1): |
| 328 | with self.subTest(proto=proto): |
| 329 | C1 = pickle.loads(pickle.dumps(C, protocol=proto)) |
| 330 | self.assertEqual(C1.output(), expected_output) |
| 331 | |
| 332 | def test_illegal_chars(self): |
| 333 | rawdata = "a=b; c,d=e" |