brand: remove all poona references and standardize on XYZ Hospital
This commit is contained in:
@@ -39,7 +39,7 @@ AI_EXPORT_SECTIONS = [
|
||||
|
||||
|
||||
def test_ai6_role_matrix_department_user_403_and_viewers_200(client):
|
||||
dept_hdr = _auth_headers(client, "dept@poona.demo")
|
||||
dept_hdr = _auth_headers(client, "dept@xyz.demo")
|
||||
|
||||
# department_user must get 403 on EVERY /api/ai/* route
|
||||
for url in AI_GET_ENDPOINTS:
|
||||
@@ -61,9 +61,9 @@ def test_ai6_role_matrix_department_user_403_and_viewers_200(client):
|
||||
|
||||
# management, coordinator, biomedical get 200 on all GETs, 403 on regenerate
|
||||
for email in (
|
||||
"mgmt@poona.demo",
|
||||
"coord@poona.demo",
|
||||
"bio@poona.demo",
|
||||
"mgmt@xyz.demo",
|
||||
"coord@xyz.demo",
|
||||
"bio@xyz.demo",
|
||||
):
|
||||
hdr = _auth_headers(client, email)
|
||||
for url in AI_GET_ENDPOINTS:
|
||||
@@ -77,7 +77,7 @@ def test_ai6_role_matrix_department_user_403_and_viewers_200(client):
|
||||
assert r_regen.status_code == 403, f"Expected 403 for {email} on regenerate"
|
||||
|
||||
# system_admin gets 200 on all GETs AND 200 on regenerate
|
||||
admin_hdr = _auth_headers(client, "admin@poona.demo")
|
||||
admin_hdr = _auth_headers(client, "admin@xyz.demo")
|
||||
for url in AI_GET_ENDPOINTS:
|
||||
r = client.get(url, headers=admin_hdr)
|
||||
assert r.status_code == 200, f"Expected 200 for admin on {url}: {r.text}"
|
||||
@@ -95,7 +95,7 @@ def test_ai6_role_matrix_department_user_403_and_viewers_200(client):
|
||||
|
||||
|
||||
def test_ai6_scoping_department_category_and_custom_period(client, db):
|
||||
mgmt_hdr = _auth_headers(client, "mgmt@poona.demo")
|
||||
mgmt_hdr = _auth_headers(client, "mgmt@xyz.demo")
|
||||
icu = db.query(Department).filter(Department.code == "ICU").first()
|
||||
cat = db.query(Category).first()
|
||||
assert icu is not None and cat is not None
|
||||
@@ -131,7 +131,7 @@ def test_ai6_scoping_department_category_and_custom_period(client, db):
|
||||
def test_ai6_default_none_provider_shapes_and_real_seeded_data(client, monkeypatch):
|
||||
from app.core.config import settings
|
||||
monkeypatch.setattr(settings, "AI_PROVIDER", "none")
|
||||
admin_hdr = _auth_headers(client, "admin@poona.demo")
|
||||
admin_hdr = _auth_headers(client, "admin@xyz.demo")
|
||||
|
||||
status_res = client.get("/api/ai/status", headers=admin_hdr)
|
||||
assert status_res.status_code == 200
|
||||
@@ -169,7 +169,7 @@ def test_ai6_default_none_provider_shapes_and_real_seeded_data(client, monkeypat
|
||||
|
||||
|
||||
def test_ai6_exports_xlsx_three_sheets_and_csv(client):
|
||||
biomed_hdr = _auth_headers(client, "bio@poona.demo")
|
||||
biomed_hdr = _auth_headers(client, "bio@xyz.demo")
|
||||
|
||||
for sec in AI_EXPORT_SECTIONS:
|
||||
r_xlsx = client.get(f"/api/ai/{sec}/export?format=xlsx&period=12m", headers=biomed_hdr)
|
||||
|
||||
Reference in New Issue
Block a user