The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(email): pin both spf clause orders and name the auth-results test for what it covers
kshitijk4poor6f7a7991bb06
diff --git a/tests/gateway/test_email.py b/tests/gateway/test_email.pyindex 7de4c97a31a..5188c8a74dc 100644--- a/tests/gateway/test_email.py+++ b/tests/gateway/test_email.py@@ -1208,7 +1208,7 @@ class TestSenderAuthentication(unittest.TestCase):addr = _extract_email_address(from_addr)return _verify_sender_authentication(msg, addr, authserv_id=authserv_id)- def test_dmarc_pass_authenticates(self):+ def test_auth_results_verdicts(self):ok, reason = self._verify("Admin <[email protected]>",["mx.google.com; dmarc=pass header.from=example.com; spf=pass"],@@ -1240,6 +1240,7 @@ class TestSenderAuthentication(unittest.TestCase):"mx.google.com; spf=fail [email protected]; dmarc=fail header.from=example.com",'mx.google.com; dkim=pass header.d=evil.test header.i="x header.d=example.com y"@evil.test',"mx.google.com; spf=pass smtp.mailfrom=example.com; spf=fail smtp.mailfrom=evil.test",+ "mx.google.com; spf=fail smtp.mailfrom=evil.test; spf=pass smtp.mailfrom=example.com","mx.google.com; dkim=pass header.d=evil.test; dkim=fail header.d=example.com",'mx.google.com; dkim=pass header.i="x header.d=example.com"@evil.test',# an escaped quote keeps the quoted-string open, so no dmarc clause is smuggled out of it