Feat & Fix(API): Sending emails to users
- Send emails to users when they register or when they reset their password. - Fix `.gitignore` not recoginizing changes in `lib` folder
This commit is contained in:
0
backend/tests/__init__.py
Normal file
0
backend/tests/__init__.py
Normal file
0
backend/tests/lib/__init__.py
Normal file
0
backend/tests/lib/__init__.py
Normal file
10
backend/tests/lib/email.py
Normal file
10
backend/tests/lib/email.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from pytest import LogCaptureFixture
|
||||
from quart import Quart
|
||||
|
||||
from backend.lib.email import send_email
|
||||
|
||||
|
||||
async def test_send_email(app: Quart, caplog: LogCaptureFixture) -> None:
|
||||
async with app.app_context():
|
||||
await send_email("member@tozo.dev", "Welcome", "email.html", {})
|
||||
assert "Sending email.html to member@tozo.dev" in caplog.text
|
Reference in New Issue
Block a user