| 295 | self.assertEqual(C.output(), '') |
| 296 | |
| 297 | def test_pickle(self): |
| 298 | rawdata = 'Customer="WILE_E_COYOTE"; Path=/acme; Version=1' |
| 299 | expected_output = 'Set-Cookie: %s' % rawdata |
| 300 | |
| 301 | C = cookies.SimpleCookie() |
| 302 | C.load(rawdata) |
| 303 | self.assertEqual(C.output(), expected_output) |
| 304 | |
| 305 | for proto in range(pickle.HIGHEST_PROTOCOL + 1): |
| 306 | with self.subTest(proto=proto): |
| 307 | C1 = pickle.loads(pickle.dumps(C, protocol=proto)) |
| 308 | self.assertEqual(C1.output(), expected_output) |
| 309 | |
| 310 | def test_illegal_chars(self): |
| 311 | rawdata = "a=b; c,d=e" |