summaryrefslogtreecommitdiff
path: root/src/mailman_pgp/commands/tests/test_key.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman_pgp/commands/tests/test_key.py')
-rw-r--r--src/mailman_pgp/commands/tests/test_key.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mailman_pgp/commands/tests/test_key.py b/src/mailman_pgp/commands/tests/test_key.py
index 0125888..8920e44 100644
--- a/src/mailman_pgp/commands/tests/test_key.py
+++ b/src/mailman_pgp/commands/tests/test_key.py
@@ -686,6 +686,14 @@ class TestAfterSubscription(unittest.TestCase):
results_msg.get_payload())
def test_change_no_key(self):
+ bart = getUtility(IUserManager).create_address('bart@example.com',
+ 'Bart Person')
+ with transaction() as t:
+ pgp_address = PGPAddress(bart)
+ pgp_address.key = self.bart_key.pubkey
+ pgp_address.key_confirmed = True
+ t.add(pgp_address)
+
message = _create_plain('bart@example.com', 'test@example.com',
'key change', '')
@@ -699,6 +707,14 @@ class TestAfterSubscription(unittest.TestCase):
results_msg.get_payload())
def test_change_multiple_keys(self):
+ bart = getUtility(IUserManager).create_address('bart@example.com',
+ 'Bart Person')
+ with transaction() as t:
+ pgp_address = PGPAddress(bart)
+ pgp_address.key = self.bart_key.pubkey
+ pgp_address.key_confirmed = True
+ t.add(pgp_address)
+
set_message = _create_mixed('bart@example.com', 'test@example.com',
'key change')