aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/rules/tests/test_signature.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman_pgp/rules/tests/test_signature.py')
-rw-r--r--src/mailman_pgp/rules/tests/test_signature.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mailman_pgp/rules/tests/test_signature.py b/src/mailman_pgp/rules/tests/test_signature.py
index c6bcb16..2dce173 100644
--- a/src/mailman_pgp/rules/tests/test_signature.py
+++ b/src/mailman_pgp/rules/tests/test_signature.py
@@ -19,6 +19,7 @@
from unittest import TestCase
from mailman.app.lifecycle import create_list
+from mailman.email.message import Message
from mailman.interfaces.action import Action
from mailman.interfaces.chain import AcceptEvent
from mailman.interfaces.member import MemberRole
@@ -245,3 +246,20 @@ class TestPostingEvent(TestCase):
sig_hash = PGPSigHash.query().filter_by(hash=hash).one()
self.assertIsNotNone(sig_hash)
self.assertEqual(sig_hash.fingerprint, self.sender_key.fingerprint)
+
+ def test_no_pgp_list(self):
+ with mm_transaction():
+ mlist = create_list('ordinary@example.com')
+ notify(AcceptEvent(mlist, Message(), dict(),
+ mm_config.chains[PGPChain.name]))
+
+ def test_no_pgp_address(self):
+ msg = mfs("""\
+From: anne@example.com
+To: test@example.com
+Subject: something
+
+Some text.
+""")
+ notify(AcceptEvent(self.mlist, msg, dict(),
+ mm_config.chains[PGPChain.name]))