diff options
| author | Barry Warsaw | 2015-08-04 22:24:50 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-08-04 22:24:50 -0400 |
| commit | ed6088c24936c799a2581ad14e4ace20e6be5e2c (patch) | |
| tree | faeb6a6ba9b1379d54243d859a5a05ea40290405 /src/mailman/model/tests/test_listmanager.py | |
| parent | a4bf5b02b5d02a6ae107c4152c166c3191689057 (diff) | |
| download | mailman-ed6088c24936c799a2581ad14e4ace20e6be5e2c.tar.gz mailman-ed6088c24936c799a2581ad14e4ace20e6be5e2c.tar.zst mailman-ed6088c24936c799a2581ad14e4ace20e6be5e2c.zip | |
Diffstat (limited to 'src/mailman/model/tests/test_listmanager.py')
| -rw-r--r-- | src/mailman/model/tests/test_listmanager.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/mailman/model/tests/test_listmanager.py b/src/mailman/model/tests/test_listmanager.py index 0b68002e0..c8fe39186 100644 --- a/src/mailman/model/tests/test_listmanager.py +++ b/src/mailman/model/tests/test_listmanager.py @@ -29,7 +29,6 @@ import unittest from mailman.app.lifecycle import create_list from mailman.app.moderator import hold_message from mailman.config import config -from mailman.database.transaction import transaction from mailman.interfaces.autorespond import IAutoResponseSet, Response from mailman.interfaces.address import InvalidEmailAddressError from mailman.interfaces.listmanager import ( @@ -89,23 +88,30 @@ class TestListManager(unittest.TestCase): sorted(getUtility(IListManager).list_ids), ['ant.example.com', 'bee.example.com', 'cat.example.com']) - def test_delete_lists_with_data_in_listarchiver(self): + def test_delete_list_with_list_archiver_set(self): + # Ensure that mailing lists with archiver sets can be deleted. In + # issue #115, this fails under PostgreSQL, but not SQLite. mlist = create_list('ant@example.com') - aset = IListArchiverSet(mlist) + # We don't keep a reference to this archiver set just because it makes + # pyflakes unhappy. It doesn't change the outcome. + IListArchiverSet(mlist) list_manager = getUtility(IListManager) list_manager.delete(mlist) self.assertIsNone(list_manager.get('ant@example.com')) - def test_delete_lists_with_data_in_autoresponserecord(self): + def test_delete_list_with_autoresponse_record(self): + # Ensure that mailing lists with auto-response sets can be deleted. In + # issue #115, this fails under PostgreSQL, but not SQLite. list_manager = getUtility(IListManager) user_manager = getUtility(IUserManager) mlist = create_list('ant@example.com') - addr = user_manager.create_address('aperson@example.com') - autoresset = IAutoResponseSet(mlist) - autoresset.response_sent(addr, Response.hold) + address = user_manager.create_address('aperson@example.com') + autoresponse_set = IAutoResponseSet(mlist) + autoresponse_set.response_sent(address, Response.hold) list_manager.delete(mlist) self.assertIsNone(list_manager.get('ant@example.com')) + class TestListLifecycleEvents(unittest.TestCase): layer = ConfigLayer |
