(self)
| 215 | 'Set-Cookie: Customer="WILE_E_COYOTE"; HttpOnly; Partitioned; Secure') |
| 216 | |
| 217 | def test_samesite_attrs(self): |
| 218 | samesite_values = ['Strict', 'Lax', 'strict', 'lax'] |
| 219 | for val in samesite_values: |
| 220 | with self.subTest(val=val): |
| 221 | C = cookies.SimpleCookie('Customer="WILE_E_COYOTE"') |
| 222 | C['Customer']['samesite'] = val |
| 223 | self.assertEqual(C.output(), |
| 224 | 'Set-Cookie: Customer="WILE_E_COYOTE"; SameSite=%s' % val) |
| 225 | |
| 226 | C = cookies.SimpleCookie() |
| 227 | C.load('Customer="WILL_E_COYOTE"; SameSite=%s' % val) |
| 228 | self.assertEqual(C['Customer']['samesite'], val) |
| 229 | |
| 230 | def test_secure_httponly_false_if_not_present(self): |
| 231 | C = cookies.SimpleCookie() |
nothing calls this directly
no test coverage detected