MCPcopy
hub / github.com/pallets/werkzeug / test_httponly

Method test_httponly

tests/test_wrappers.py:1258–1279  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 2

set_cookieMethod · 0.95
to_wsgi_listMethod · 0.80

Tested by

no test coverage detected