diff options
| author | Abhilash Raj | 2016-07-30 21:06:57 -0700 |
|---|---|---|
| committer | Barry Warsaw | 2016-09-01 06:55:09 -0400 |
| commit | 88f349900ea9afea30186c3c9f0f399ff69f6c4a (patch) | |
| tree | 984a31ab8be58871bacf4a5821ddc611ac4586fe /src/mailman/model/tests | |
| parent | c23519b5262fd264ed0f9e5bc23b901ed7eee632 (diff) | |
| download | mailman-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.py | 13 | ||||
| -rw-r--r-- | src/mailman/model/tests/test_workflow.py | 2 |
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') |
