(self)
| 1256 | ] |
| 1257 | |
| 1258 | def test_httponly(self): |
| 1259 | response = wrappers.Response() |
| 1260 | response.set_cookie( |
| 1261 | "foo", |
| 1262 | value="bar", |
| 1263 | max_age=60, |
| 1264 | expires=0, |
| 1265 | path="/blub", |
| 1266 | domain="example.org", |
| 1267 | secure=False, |
| 1268 | httponly=True, |
| 1269 | samesite=None, |
| 1270 | ) |
| 1271 | assert response.headers.to_wsgi_list() == [ |
| 1272 | ("Content-Type", "text/plain; charset=utf-8"), |
| 1273 | ( |
| 1274 | "Set-Cookie", |
| 1275 | "foo=bar; Domain=example.org;" |
| 1276 | " Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=60;" |
| 1277 | " HttpOnly; Path=/blub", |
| 1278 | ), |
| 1279 | ] |
| 1280 | |
| 1281 | def test_secure_and_httponly(self): |
| 1282 | response = wrappers.Response() |
nothing calls this directly
no test coverage detected