fix: skip sending email process while running tests
All checks were successful
ci / ruff (push) Successful in 4s
ci / ty (push) Successful in 4s
ci / tests (push) Successful in 15s

Removes the need for lettermint api key in CI.
This commit is contained in:
Chris Milne 2026-06-22 12:06:43 +01:00
parent 63e7d48c07
commit 02ddf9a3ed

View file

@ -39,9 +39,12 @@ async def verify_email_token(user_model, token):
async def send_email(recipient: str, subject: str, body: str):
if settings.ENVIRONMENT.is_testing:
return
lettermint = Lettermint(api_token=settings.LETTERMINT_API_TOKEN.get_secret_value())
if settings.ENVIRONMENT.is_testing or settings.ENVIRONMENT == "local":
if settings.ENVIRONMENT == "local":
recipient = "ok@testing.lettermint.co"
try: