forked from sr2/cloud-api
fix: skip sending email process while running tests
Removes the need for lettermint api key in CI.
This commit is contained in:
parent
63e7d48c07
commit
02ddf9a3ed
1 changed files with 4 additions and 1 deletions
|
|
@ -39,9 +39,12 @@ async def verify_email_token(user_model, token):
|
||||||
|
|
||||||
|
|
||||||
async def send_email(recipient: str, subject: str, body: str):
|
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())
|
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"
|
recipient = "ok@testing.lettermint.co"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue