Files
notifications-admin/tests/app/main/views/test_headers.py
Chris Hill-Scott 97b02edbf9 Add introducer video to the product page
It’s always been the plan to put this video on the product page. Just
getting round to it now.

Watch the video here: https://www.youtube.com/watch?v=i2a2jiwYTd4

Uses the CSS developed by the service manual team, taken from here:
a5c613f07b/source/stylesheets/modules/_responsive-embed.scss
2017-01-23 16:25:11 +00:00

17 lines
742 B
Python

def test_owasp_useful_headers_set(app_):
with app_.test_request_context():
response = app_.test_client().get('/')
assert response.status_code == 200
assert response.headers['X-Frame-Options'] == 'deny'
assert response.headers['X-Content-Type-Options'] == 'nosniff'
assert response.headers['X-XSS-Protection'] == '1; mode=block'
assert response.headers['Content-Security-Policy'] == (
"default-src 'self' 'unsafe-inline';"
"script-src 'self' *.google-analytics.com 'unsafe-inline' 'unsafe-eval' data:;"
"object-src 'self';"
"font-src 'self' data:;"
"img-src 'self' *.google-analytics.com *.notifications.service.gov.uk data:;"
"frame-src www.youtube.com;"
)