Files
notifications-admin/tests/app/main/views/test_headers.py
Nicholas Staples 3b1d521c10 Tests added for dao.
2016-01-15 15:15:35 +00:00

10 lines
484 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'; font-src 'self' data:;" # noqa