cloud-api/test/test_auth_general.py

19 lines
418 B
Python
Raw Normal View History

""" """
2026-06-05 09:10:55 +01:00
import pytest
from httpx import AsyncClient
2026-06-09 13:58:08 +01:00
pytestmark = [
pytest.mark.auth,
]
2026-06-05 09:10:55 +01:00
@pytest.mark.anyio
async def test_get_org_auth_root_su(default_client: AsyncClient):
2026-06-05 09:10:55 +01:00
# If a super admin can access a resource when not the root user
resp = await default_client.get("/org?org_id=2")
assert resp.status_code != 422
assert resp.status_code == 200
assert resp.json()["organisations"][0]["name"] == "Org Two"