mirror of
https://github.com/simple-login/app.git
synced 2025-02-25 00:03:03 +08:00
comment out soft_fail test
This commit is contained in:
parent
4dbe22d856
commit
8820cecdd3
1 changed files with 19 additions and 18 deletions
|
@ -97,21 +97,22 @@ def test_dmarc_quarantine(flask_client):
|
|||
assert f"{alias.email} has a new mail in quarantine" == notifications[0].title
|
||||
|
||||
|
||||
def test_gmail_dmarc_softfail(flask_client):
|
||||
user = create_random_user()
|
||||
alias = Alias.create_new_random(user)
|
||||
msg = load_eml_file("dmarc_gmail_softfail.eml", {"alias_email": alias.email})
|
||||
envelope = Envelope()
|
||||
envelope.mail_from = msg["from"]
|
||||
envelope.rcpt_tos = [msg["to"]]
|
||||
result = email_handler.handle(envelope, msg)
|
||||
assert result == status.E215
|
||||
email_logs = (
|
||||
EmailLog.filter_by(user_id=user.id, alias_id=alias.id)
|
||||
.order_by(EmailLog.id.desc())
|
||||
.all()
|
||||
)
|
||||
assert len(email_logs) == 1
|
||||
email_log = email_logs[0]
|
||||
assert email_log.blocked
|
||||
assert email_log.refused_email_id
|
||||
# todo: re-enable test when softfail is quarantined
|
||||
# def test_gmail_dmarc_softfail(flask_client):
|
||||
# user = create_random_user()
|
||||
# alias = Alias.create_new_random(user)
|
||||
# msg = load_eml_file("dmarc_gmail_softfail.eml", {"alias_email": alias.email})
|
||||
# envelope = Envelope()
|
||||
# envelope.mail_from = msg["from"]
|
||||
# envelope.rcpt_tos = [msg["to"]]
|
||||
# result = email_handler.handle(envelope, msg)
|
||||
# assert result == status.E215
|
||||
# email_logs = (
|
||||
# EmailLog.filter_by(user_id=user.id, alias_id=alias.id)
|
||||
# .order_by(EmailLog.id.desc())
|
||||
# .all()
|
||||
# )
|
||||
# assert len(email_logs) == 1
|
||||
# email_log = email_logs[0]
|
||||
# assert email_log.blocked
|
||||
# assert email_log.refused_email_id
|
||||
|
|
Loading…
Reference in a new issue