summaryrefslogtreecommitdiff
path: root/src/mailman/model/tests
diff options
context:
space:
mode:
authorAbhilash Raj2016-07-30 21:06:57 -0700
committerBarry Warsaw2016-09-01 06:55:09 -0400
commit88f349900ea9afea30186c3c9f0f399ff69f6c4a (patch)
tree984a31ab8be58871bacf4a5821ddc611ac4586fe /src/mailman/model/tests
parentc23519b5262fd264ed0f9e5bc23b901ed7eee632 (diff)
downloadmailman-88f349900ea9afea30186c3c9f0f399ff69f6c4a.tar.gz
mailman-88f349900ea9afea30186c3c9f0f399ff69f6c4a.tar.zst
mailman-88f349900ea9afea30186c3c9f0f399ff69f6c4a.zip
Intermediate Commit
Diffstat (limited to 'src/mailman/model/tests')
-rw-r--r--src/mailman/model/tests/test_mailinglist.py13
-rw-r--r--src/mailman/model/tests/test_workflow.py2
2 files changed, 14 insertions, 1 deletions
diff --git a/src/mailman/model/tests/test_mailinglist.py b/src/mailman/model/tests/test_mailinglist.py
index c9aecc93b..3e3c5814c 100644
--- a/src/mailman/model/tests/test_mailinglist.py
+++ b/src/mailman/model/tests/test_mailinglist.py
@@ -17,6 +17,7 @@
"""Test MailingLists and related model objects.."""
+import pdb
import unittest
from mailman.app.lifecycle import create_list
@@ -92,6 +93,18 @@ class TestMailingList(unittest.TestCase):
self.assertIn('Anne Person <aperson@example.com>',
items[0].msg.get_payload())
+ def test_is_subscribed(self):
+ manager = getUtility(IUserManager)
+ user = manager.create_user('anne@example.com', 'Anne Person')
+ set_preferred(user)
+ self.assertEqual(False, self._mlist.is_subscribed(user))
+ self._mlist.subscribe(user)
+ self.assertEqual(True, self._mlist.is_subscribed(user))
+ address = manager.create_address('anne2@example.com', 'Anne Person')
+ address.verfied_on = now()
+ self.assertEqual(False, self._mlist.is_subscribed(address))
+ self._mlist.subscribe(address)
+ self.assertEqual(True, self._mlist.is_subscribed(address))
class TestListArchiver(unittest.TestCase):
layer = ConfigLayer
diff --git a/src/mailman/model/tests/test_workflow.py b/src/mailman/model/tests/test_workflow.py
index 4c8c6776f..afcba613b 100644
--- a/src/mailman/model/tests/test_workflow.py
+++ b/src/mailman/model/tests/test_workflow.py
@@ -124,7 +124,7 @@ class TestWorkflow(unittest.TestCase):
self.assertEqual(self._manager.count, 1)
def test_discard(self):
- # Discard some workflow state. This is use by IRegistrar.discard().
+ # Discard some workflow state. This is use by IWorkflowManager.discard().
self._manager.save('ant', 'token', 'one')
self._manager.save('bee', 'token', 'two')
self._manager.save('ant', 'nekot', 'three')