diff options
| author | Barry Warsaw | 2015-04-16 15:28:06 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-04-16 15:28:06 -0400 |
| commit | 53d4229bff96677a54fd443322c166c2bdcc3054 (patch) | |
| tree | ff233bc6fa95d24bc4e66c8192d10c1b87ed2efc /src/mailman/app/tests/test_subscriptions.py | |
| parent | c5e63e32bd713ef6b3ba05cec5cdc4926a44bcc5 (diff) | |
| download | mailman-53d4229bff96677a54fd443322c166c2bdcc3054.tar.gz mailman-53d4229bff96677a54fd443322c166c2bdcc3054.tar.zst mailman-53d4229bff96677a54fd443322c166c2bdcc3054.zip | |
Diffstat (limited to 'src/mailman/app/tests/test_subscriptions.py')
| -rw-r--r-- | src/mailman/app/tests/test_subscriptions.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mailman/app/tests/test_subscriptions.py b/src/mailman/app/tests/test_subscriptions.py index 732266ac3..6b5d88026 100644 --- a/src/mailman/app/tests/test_subscriptions.py +++ b/src/mailman/app/tests/test_subscriptions.py @@ -57,6 +57,22 @@ class TestSubscriptionWorkflow(unittest.TestCase): self.assertEqual(workflow.token_owner, TokenOwner.no_one) self.assertIsNone(workflow.member) + def test_pended_data(self): + # There is a Pendable associated with the held request, and it has + # some data associated with it. + anne = self._user_manager.create_address(self._anne) + workflow = SubscriptionWorkflow(self._mlist, anne) + try: + workflow.run_thru('send_confirmation') + except StopIteration: + pass + self.assertIsNotNone(workflow.token) + pendable = getUtility(IPendings).confirm(workflow.token, expunge=False) + self.assertEqual(pendable['list_id'], 'test.example.com') + self.assertEqual(pendable['address'], 'anne@example.com') + self.assertEqual(pendable['hold_date'], '2005-08-01T07:49:23') + self.assertEqual(pendable['token_owner'], 'subscriber') + def test_user_or_address_required(self): # The `subscriber` attribute must be a user or address. workflow = SubscriptionWorkflow(self._mlist) |
