aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/workflows/tests
diff options
context:
space:
mode:
authorJ08nY2017-07-11 23:00:53 +0200
committerJ08nY2017-07-11 23:00:53 +0200
commit329532bc05f83edb4cd23e2ae82da777511c9857 (patch)
tree4bf54d0928a2ff7b23cd0dd3882373f2e16ca635 /src/mailman_pgp/workflows/tests
parent44bde427fdcc78344892f3413597c7be66eca8e9 (diff)
downloadmailman-pgp-329532bc05f83edb4cd23e2ae82da777511c9857.tar.gz
mailman-pgp-329532bc05f83edb4cd23e2ae82da777511c9857.tar.zst
mailman-pgp-329532bc05f83edb4cd23e2ae82da777511c9857.zip
Diffstat (limited to 'src/mailman_pgp/workflows/tests')
-rw-r--r--src/mailman_pgp/workflows/tests/test_base.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mailman_pgp/workflows/tests/test_base.py b/src/mailman_pgp/workflows/tests/test_base.py
index c99c6d6..4f39296 100644
--- a/src/mailman_pgp/workflows/tests/test_base.py
+++ b/src/mailman_pgp/workflows/tests/test_base.py
@@ -189,3 +189,20 @@ class TestPubkeyMixin(unittest.TestCase):
with patch.object(receive_workflow, '_step_do_subscription') as step:
next(receive_workflow)
step.assert_called_once_with()
+
+ def test_exisitng_pgp_address(self):
+ workflow = ConfirmSubscriptionPolicy(self.mlist, self.sender,
+ pre_verified=True,
+ pre_confirmed=True)
+
+ with transaction() as t:
+ pgp_address = PGPAddress(self.sender)
+ pgp_address.key = self.sender_key.pubkey
+ pgp_address.key_confirmed = True
+ t.add(pgp_address)
+
+ workflow.run_thru('pubkey_checks')
+ next(workflow)
+ with patch.object(workflow, '_step_do_subscription') as step:
+ next(workflow)
+ step.assert_called_once_with()