(self)
| 1279 | ] |
| 1280 | |
| 1281 | def test_secure_and_httponly(self): |
| 1282 | response = wrappers.Response() |
| 1283 | response.set_cookie( |
| 1284 | "foo", |
| 1285 | value="bar", |
| 1286 | max_age=60, |
| 1287 | expires=0, |
| 1288 | path="/blub", |
| 1289 | domain="example.org", |
| 1290 | secure=True, |
| 1291 | httponly=True, |
| 1292 | samesite=None, |
| 1293 | ) |
| 1294 | assert response.headers.to_wsgi_list() == [ |
| 1295 | ("Content-Type", "text/plain; charset=utf-8"), |
| 1296 | ( |
| 1297 | "Set-Cookie", |
| 1298 | "foo=bar; Domain=example.org;" |
| 1299 | " Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=60;" |
| 1300 | " Secure; HttpOnly; Path=/blub", |
| 1301 | ), |
| 1302 | ] |
| 1303 | |
| 1304 | def test_samesite(self): |
| 1305 | response = wrappers.Response() |
nothing calls this directly
no test coverage detected