add tests to email

This commit is contained in:
2025-11-26 23:33:12 -03:00
parent 5859248781
commit ab7e4ea38b
9 changed files with 1040 additions and 718 deletions

View File

@@ -103,6 +103,7 @@ def unlink(org_id: str, user_id: str):
def _create_user(user: User, org: Org) -> bool:
now_ = now()
user_id = uuid4()
email_verified = '@users.noreply.saladeaula.digital' in user.email
try:
with dyn.transact_writer() as transact:
@@ -111,7 +112,7 @@ def _create_user(user: User, org: Org) -> bool:
**user.model_dump(),
'id': user_id,
'sk': '0',
'email_verified': False,
'email_verified': email_verified,
'tenant_id': {org.id},
# Post-migration: uncomment the folloing line
# 'org_id': {org.id},
@@ -123,7 +124,7 @@ def _create_user(user: User, org: Org) -> bool:
'id': user_id,
# Post-migration: rename `emails` to `EMAIL`
'sk': f'emails#{user.email}',
'email_verified': False,
'email_verified': email_verified,
'email_primary': True,
'created_at': now_,
}