mirror of
https://github.com/chatmail/relay.git
synced 2026-05-20 12:58:04 +00:00
tests: SMTPDataError doesn't have recipients
This commit is contained in:
@@ -195,9 +195,8 @@ def test_exceed_rate_limit(cmsetup, gencreds, maildata, chatmail_config):
|
|||||||
except smtplib.SMTPException as e:
|
except smtplib.SMTPException as e:
|
||||||
if i < chatmail_config.max_user_send_per_minute:
|
if i < chatmail_config.max_user_send_per_minute:
|
||||||
pytest.fail(f"rate limit was exceeded too early with msg {i}")
|
pytest.fail(f"rate limit was exceeded too early with msg {i}")
|
||||||
outcome = e.recipients[user2.addr]
|
assert e.smtp_code == 450
|
||||||
assert outcome[0] == 450
|
assert b"4.7.1: Too much mail from" in e.smtp_error
|
||||||
assert b"4.7.1: Too much mail from" in outcome[1]
|
|
||||||
return
|
return
|
||||||
pytest.fail("Rate limit was not exceeded")
|
pytest.fail("Rate limit was not exceeded")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user