TorbatYar/backend/services/identity-access/app/tests/test_auth.py
Mortezakoohjani 800b0ba2c5 Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing.
Wire production domain, CORS for tenant subdomains, celery volume mounts, and nginx reverse proxy configs for apex, API, identity, auth, and wildcard tenants.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 21:43:33 +03:30

20 lines
656 B
Python

async def test_health(client):
resp = await client.get("/health")
assert resp.status_code == 200
assert resp.json()["service"] == "identity-access-service"
async def test_auth_config(client):
resp = await client.get("/api/v1/auth/config")
assert resp.status_code == 200
body = resp.json()
assert "authorization_endpoint" in body
assert body["client_id"] == "superapp-frontend"
async def test_auth_me_without_token_when_auth_disabled(client):
# با AUTH_REQUIRED=false در conftest
resp = await client.get("/api/v1/auth/me")
assert resp.status_code == 200
assert resp.json()["roles"]