diff options
| author | J08nY | 2017-07-12 19:48:22 +0200 |
|---|---|---|
| committer | J08nY | 2017-07-12 19:48:22 +0200 |
| commit | d01183610f3df226da76b3f853666e520cf22461 (patch) | |
| tree | acb45e1ae524c03c41601525d5530ccc5c160a37 | |
| parent | 2fd2f28f4389e3d0cad4fdc9c6067b5baff291e6 (diff) | |
| download | mailman-pgp-d01183610f3df226da76b3f853666e520cf22461.tar.gz mailman-pgp-d01183610f3df226da76b3f853666e520cf22461.tar.zst mailman-pgp-d01183610f3df226da76b3f853666e520cf22461.zip | |
| -rw-r--r-- | src/mailman_pgp/workflows/tests/test_base.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/mailman_pgp/workflows/tests/test_base.py b/src/mailman_pgp/workflows/tests/test_base.py index 4f39296..5b07e5b 100644 --- a/src/mailman_pgp/workflows/tests/test_base.py +++ b/src/mailman_pgp/workflows/tests/test_base.py @@ -206,3 +206,32 @@ class TestPubkeyMixin(unittest.TestCase): with patch.object(workflow, '_step_do_subscription') as step: next(workflow) step.assert_called_once_with() + + def test_exisitng_pgp_address_not_confirmed(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 + t.add(pgp_address) + + workflow.run_thru('pubkey_checks') + with patch.object(workflow, '_step_send_key_confirm_request') as step: + next(workflow) + step.assert_called_once_with() + + def test_exisitng_pgp_address_no_key(self): + workflow = ConfirmSubscriptionPolicy(self.mlist, self.sender, + pre_verified=True, + pre_confirmed=True) + + with transaction() as t: + pgp_address = PGPAddress(self.sender) + t.add(pgp_address) + + workflow.run_thru('pubkey_checks') + with patch.object(workflow, '_step_send_key_request') as step: + next(workflow) + step.assert_called_once_with() |
