fix: CSRF exempt unit_tests (#27168)

This commit is contained in:
Daniel Vaz Gaspar 2024-02-20 16:18:30 +00:00 committed by GitHub
parent b8fc2e57cc
commit ceda51617b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -7,10 +7,14 @@ on:
- 'master'
paths:
- "superset/**"
- "requirements/**"
- "tests/unit_tests/**"
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
paths:
- "superset/**"
- "requirements/**"
- "tests/unit_tests/**"
# cancel previous workflow jobs for PRs
concurrency:

View File

@ -28,4 +28,8 @@ def test_csrf_not_exempt(app_context: None) -> None:
"""
Test that REST API is not exempt from CSRF.
"""
assert csrf._exempt_blueprints == {"MenuApi", "SecurityApi", "OpenApi"}
assert {blueprint.name for blueprint in csrf._exempt_blueprints} == {
"MenuApi",
"SecurityApi",
"OpenApi",
}