Skip to content

Commit c9c376d

Browse files
test(csp): cover /config in CSP page-route tests
1 parent 81ee2b6 commit c9c376d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/test_csp_header.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ def test_html_page_has_content_security_policy_header(client) -> None:
7070
_assert_expected_csp_directives(csp, nonce)
7171

7272

73+
def test_config_page_has_content_security_policy_header(client) -> None:
74+
response = client.get("/config")
75+
assert response.status_code == 200
76+
csp = response.headers.get("Content-Security-Policy")
77+
assert csp
78+
nonce = _extract_csp_nonce(csp)
79+
_assert_expected_csp_directives(csp, nonce)
80+
81+
7382
def test_html_page_nonce_matches_inline_script(client) -> None:
7483
first = client.get("/search")
7584
second = client.get("/search")

0 commit comments

Comments
 (0)