(self)
| 237 | 'Set-Cookie: Customer="WILE_E_COYOTE"; HttpOnly; Partitioned; Secure') |
| 238 | |
| 239 | def test_samesite_attrs(self): |
| 240 | samesite_values = ['Strict', 'Lax', 'strict', 'lax'] |
| 241 | for val in samesite_values: |
| 242 | with self.subTest(val=val): |
| 243 | C = cookies.SimpleCookie('Customer="WILE_E_COYOTE"') |
| 244 | C['Customer']['samesite'] = val |
| 245 | self.assertEqual(C.output(), |
| 246 | 'Set-Cookie: Customer="WILE_E_COYOTE"; SameSite=%s' % val) |
| 247 | |
| 248 | C = cookies.SimpleCookie() |
| 249 | C.load('Customer="WILL_E_COYOTE"; SameSite=%s' % val) |
| 250 | self.assertEqual(C['Customer']['samesite'], val) |
| 251 | |
| 252 | def test_secure_httponly_false_if_not_present(self): |
| 253 | C = cookies.SimpleCookie() |
nothing calls this directly
no test coverage detected