aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/commands
diff options
context:
space:
mode:
authorJ08nY2017-08-07 00:50:19 +0200
committerJ08nY2017-08-07 00:50:19 +0200
commit59ec076d04340245101de98633705d312374d9fe (patch)
tree8614919b84fa1f2d6cc3edeb39f197bd7bfe518b /src/mailman_pgp/commands
parent570dfe8007d21593816d90df21f9f4fa25a7dae3 (diff)
downloadmailman-pgp-59ec076d04340245101de98633705d312374d9fe.tar.gz
mailman-pgp-59ec076d04340245101de98633705d312374d9fe.tar.zst
mailman-pgp-59ec076d04340245101de98633705d312374d9fe.zip
Diffstat (limited to 'src/mailman_pgp/commands')
-rw-r--r--src/mailman_pgp/commands/eml_key.py2
-rw-r--r--src/mailman_pgp/commands/tests/test_key.py9
2 files changed, 9 insertions, 2 deletions
diff --git a/src/mailman_pgp/commands/eml_key.py b/src/mailman_pgp/commands/eml_key.py
index 5c53699..447ecf4 100644
--- a/src/mailman_pgp/commands/eml_key.py
+++ b/src/mailman_pgp/commands/eml_key.py
@@ -179,6 +179,8 @@ def _cmd_confirm(pgp_list, mlist, msg, msgdata, arguments, results):
for sig_subject in wrapped.get_signed():
if expecting in sig_subject:
+ with transaction():
+ pgp_address.key_confirmed = True
ISubscriptionManager(mlist).confirm(token)
break
else:
diff --git a/src/mailman_pgp/commands/tests/test_key.py b/src/mailman_pgp/commands/tests/test_key.py
index f6e4edf..1a128a1 100644
--- a/src/mailman_pgp/commands/tests/test_key.py
+++ b/src/mailman_pgp/commands/tests/test_key.py
@@ -987,8 +987,13 @@ class TestAfterSubscription(unittest.TestCase):
mm_config.switchboards['command'].enqueue(message,
listid='test.example.com')
make_testable_runner(CommandRunner, 'command').run()
- items = get_queue_messages('virgin', expected_count=1)
- results_msg = items[0].msg
+ items = get_queue_messages('virgin', expected_count=2)
+ if (items[0].msg['Subject'] ==
+ 'The results of your email commands'): # pragma: no cover
+ results_msg = items[0].msg
+ else:
+ results_msg = items[1].msg
+ #TODO: finish test
self.assertIn('Key needs to be reset.', results_msg.get_payload())