email box empty styling
This commit is contained in:
parent
1ee8a58117
commit
5cb49f4cb1
19 changed files with 547 additions and 67 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from types import SimpleNamespace
|
||||
from unittest.mock import patch
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
from app.services.mail_sender import build_message, sign_message
|
||||
from app.services.mail_sender import build_message, send_via_smtp, sign_message
|
||||
|
||||
|
||||
def test_dkim_sign_uses_selector_before_domain():
|
||||
|
|
@ -27,3 +27,17 @@ def test_dkim_sign_uses_selector_before_domain():
|
|||
|
||||
assert signer.call_args.args[1] == b"agmail"
|
||||
assert signer.call_args.args[2] == b"ritoesis.com"
|
||||
|
||||
|
||||
async def test_send_via_smtp_uses_configured_client_hostname():
|
||||
with patch(
|
||||
"app.services.mail_sender.aiosmtplib.send",
|
||||
new_callable=AsyncMock,
|
||||
) as send_mock:
|
||||
await send_via_smtp(
|
||||
b"raw",
|
||||
sender="noreply@gentic.email",
|
||||
recipients=["user@example.com"],
|
||||
)
|
||||
|
||||
assert send_mock.await_args.kwargs["local_hostname"] == "backend.gentic.email"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue