From df39d052633e286f3d364aeb2cfeb76b5bbd0ba9 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 18 Oct 2023 15:30:54 +0200 Subject: [PATCH] doc the test --- chatmaild/src/chatmaild/test_filtermail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chatmaild/src/chatmaild/test_filtermail.py b/chatmaild/src/chatmaild/test_filtermail.py index 4bcae368..5e76f774 100644 --- a/chatmaild/src/chatmaild/test_filtermail.py +++ b/chatmaild/src/chatmaild/test_filtermail.py @@ -28,12 +28,13 @@ def test_reject_forged_from(): mail_from = "bob@c3.testrun.org" rcpt_tos = ["somebody@c3.testrun.org"] + # test that the filter lets good mail through envelope.content = makemail(envelope.mail_from).as_bytes() - valid_recipients, res = lmtp_handle_DATA(envelope=envelope) assert valid_recipients == envelope.rcpt_tos assert len(res) == 1 and "250" in res[0] + # test that the filter rejects forged mail envelope.content = makemail("forged@c3.testrun.org").as_bytes() valid_recipients, res = lmtp_handle_DATA(envelope=envelope) assert not valid_recipients