mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
notify-api-412 use black to enforce python coding style
This commit is contained in:
@@ -7,17 +7,17 @@ def test_owasp_useful_headers_set(
|
||||
mock_get_service_and_organization_counts,
|
||||
):
|
||||
client_request.logout()
|
||||
response = client_request.get_response('.index')
|
||||
response = client_request.get_response(".index")
|
||||
|
||||
assert response.headers['X-Frame-Options'] == 'deny'
|
||||
assert response.headers['X-Content-Type-Options'] == 'nosniff'
|
||||
csp = response.headers['Content-Security-Policy']
|
||||
assert response.headers["X-Frame-Options"] == "deny"
|
||||
assert response.headers["X-Content-Type-Options"] == "nosniff"
|
||||
csp = response.headers["Content-Security-Policy"]
|
||||
assert search(r"default-src 'self' static\.example\.com;", csp)
|
||||
assert search(r"frame-ancestors 'none';", csp)
|
||||
assert search(r"form-action 'self';", csp)
|
||||
assert search(
|
||||
r"script-src 'self' static\.example\.com 'unsafe-eval' https:\/\/js-agent\.newrelic\.com https:\/\/gov-bam\.nr-data\.net 'nonce-.*';", # noqa e501
|
||||
csp
|
||||
r"script-src 'self' static\.example\.com 'unsafe-eval' https:\/\/js-agent\.newrelic\.com https:\/\/gov-bam\.nr-data\.net 'nonce-.*';", # noqa e501
|
||||
csp,
|
||||
)
|
||||
assert search(r"connect-src 'self' https:\/\/gov-bam.nr-data\.net;", csp)
|
||||
assert search(r"style-src 'self' static\.example\.com 'nonce-.*';", csp)
|
||||
|
||||
Reference in New Issue
Block a user