fix: e-mails carry a Date header, which spam filters expect
Some checks failed
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m21s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Failing after 54s
Some checks failed
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m21s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Failing after 54s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ The local stack keeps e-mail in the database (MAIL_ADAPTER=log); the SMTP
|
||||
path is checked against a small SMTP server this test runs itself.
|
||||
"""
|
||||
import email
|
||||
import email.utils
|
||||
import hashlib
|
||||
import os
|
||||
import re
|
||||
@@ -259,6 +260,7 @@ def smtp_delivery(tag):
|
||||
rcpt, first = sink.messages[0]
|
||||
assert to in rcpt[0] and first['Subject'] == 'Crie uma nova senha · DTF Dropstar'
|
||||
assert first['From'] == 'DTF Dropstar <nao-responda@dropstar.test>'
|
||||
assert first['Date'] and email.utils.parsedate_to_datetime(first['Date'])
|
||||
assert first.get_content().strip() == 'link secreto ção'
|
||||
with db.connect() as c:
|
||||
sent = {r['kind']: r for r in queued(c, to, 'reset') + queued(c, to, 'test') + queued(c, to, 'code')}
|
||||
|
||||
Reference in New Issue
Block a user