TorbatYar/backend/services/identity-access/app/tests/test_users.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

17 lines
480 B
Python

from app.models.user import UserProfile
from app.repositories.user import UserRepository
async def test_create_user_profile(session):
repo = UserRepository(session)
user = UserProfile(
keycloak_sub="sub-123",
email="user@example.com",
username="user1",
)
await repo.add(user)
await session.commit()
found = await repo.get_by_sub("sub-123")
assert found is not None
assert found.email == "user@example.com"