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

Method test_samesite

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

Source from the content-addressed store, hash-verified

1302 ]
1303
1304 def test_samesite(self):
1305 response = wrappers.Response()
1306 response.set_cookie(
1307 "foo",
1308 value="bar",
1309 max_age=60,
1310 expires=0,
1311 path="/blub",
1312 domain="example.org",
1313 secure=False,
1314 samesite="strict",
1315 )
1316 assert response.headers.to_wsgi_list() == [
1317 ("Content-Type", "text/plain; charset=utf-8"),
1318 (
1319 "Set-Cookie",
1320 "foo=bar; Domain=example.org;"
1321 " Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=60;"
1322 " Path=/blub; SameSite=Strict",
1323 ),
1324 ]
1325
1326
1327class TestJSON:

Callers

nothing calls this directly

Calls 2

set_cookieMethod · 0.95
to_wsgi_listMethod · 0.80

Tested by

no test coverage detected