2022-12-15 09:40:38 -05:00
|
|
|
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():
|
2022-12-21 10:59:46 -05:00
|
|
|
await send_email("member@minhtrannhat.com", "Welcome", "email.html", {})
|
|
|
|
assert "Sending email.html to member@minhtrannhat.com" in caplog.text
|