mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
22 lines
604 B
Python
22 lines
604 B
Python
from tests.helpers import create_ctfd, destroy_ctfd
|
|
|
|
|
|
def test_sessions_set_httponly():
|
|
app = create_ctfd()
|
|
with app.app_context():
|
|
with app.test_client() as client:
|
|
r = client.get('/')
|
|
cookie = dict(r.headers)['Set-Cookie']
|
|
assert 'HttpOnly;' in cookie
|
|
destroy_ctfd(app)
|
|
|
|
|
|
def test_sessions_set_samesite():
|
|
app = create_ctfd()
|
|
with app.app_context():
|
|
with app.test_client() as client:
|
|
r = client.get('/')
|
|
cookie = dict(r.headers)['Set-Cookie']
|
|
assert 'SameSite=' in cookie
|
|
destroy_ctfd(app)
|