mirror of https://github.com/apache/superset.git
fix: CSRF exempt unit_tests (#27168)
This commit is contained in:
parent
b8fc2e57cc
commit
ceda51617b
|
@ -7,10 +7,14 @@ on:
|
||||||
- 'master'
|
- 'master'
|
||||||
paths:
|
paths:
|
||||||
- "superset/**"
|
- "superset/**"
|
||||||
|
- "requirements/**"
|
||||||
|
- "tests/unit_tests/**"
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [synchronize, opened, reopened, ready_for_review]
|
types: [synchronize, opened, reopened, ready_for_review]
|
||||||
paths:
|
paths:
|
||||||
- "superset/**"
|
- "superset/**"
|
||||||
|
- "requirements/**"
|
||||||
|
- "tests/unit_tests/**"
|
||||||
|
|
||||||
# cancel previous workflow jobs for PRs
|
# cancel previous workflow jobs for PRs
|
||||||
concurrency:
|
concurrency:
|
||||||
|
|
|
@ -28,4 +28,8 @@ def test_csrf_not_exempt(app_context: None) -> None:
|
||||||
"""
|
"""
|
||||||
Test that REST API is not exempt from CSRF.
|
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",
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue