aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/rules/tests/test_signature.py
diff options
context:
space:
mode:
authorJ08nY2017-07-31 02:34:00 +0200
committerJ08nY2017-07-31 02:34:00 +0200
commita07fe54b768359360bbcd84ea04dfe204637849d (patch)
tree7bd8256b8173dac249dbc07c493e6f4bcddb72f4 /src/mailman_pgp/rules/tests/test_signature.py
parent6d87f5b0c8c7e7a3f71e0c5d5392201b4e4769ff (diff)
downloadmailman-pgp-a07fe54b768359360bbcd84ea04dfe204637849d.tar.gz
mailman-pgp-a07fe54b768359360bbcd84ea04dfe204637849d.tar.zst
mailman-pgp-a07fe54b768359360bbcd84ea04dfe204637849d.zip
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]))