summaryrefslogtreecommitdiff
path: root/src/mailman/app/tests/test_moderation.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/app/tests/test_moderation.py')
-rw-r--r--src/mailman/app/tests/test_moderation.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mailman/app/tests/test_moderation.py b/src/mailman/app/tests/test_moderation.py
index 90485bfad..20584da49 100644
--- a/src/mailman/app/tests/test_moderation.py
+++ b/src/mailman/app/tests/test_moderation.py
@@ -153,17 +153,21 @@ class TestUnsubscription(unittest.TestCase):
def setUp(self):
self._mlist = create_list('test@example.com')
- self._registrar = ISubscriptionManager(self._mlist)
+ self._manager = ISubscriptionManager(self._mlist)
def test_unsubscribe_defer(self):
# When unsubscriptions must be approved by the moderator, but the
# moderator defers this decision.
anne = getUtility(IUserManager).create_address(
'anne@example.org', 'Anne Person')
- token, token_owner, member = self._registrar.register(
+ token, token_owner, member = self._manager.register(
anne, pre_verified=True, pre_confirmed=True, pre_approved=True)
self.assertIsNone(token)
self.assertEqual(member.address.email, 'anne@example.org')
# Now hold and handle an unsubscription request.
token = hold_unsubscription(self._mlist, 'anne@example.org')
handle_unsubscription(self._mlist, token, Action.defer)
+
+ def test_bogus_token(self):
+ # Try to handle an unsubscription with a bogus token.
+ self.assertRaises(LookupError, self._manager.confirm, None)