17 lines
466 B
Python
17 lines
466 B
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def test_project_management_write_routes_allow_project_admin_and_pm():
|
|
for relative_path in (
|
|
"app/api/v1/studies.py",
|
|
"app/api/v1/sites.py",
|
|
"app/api/v1/members.py",
|
|
):
|
|
source = (ROOT / relative_path).read_text(encoding="utf-8")
|
|
|
|
assert 'require_study_roles(["PM"])' not in source
|
|
assert 'require_study_roles(["ADMIN", "PM"])' in source
|