diff options
| author | Barry Warsaw | 2012-09-04 21:31:50 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-09-04 21:31:50 -0400 |
| commit | 3c77c83ec4070e7183482445ff0b9a30398b72f4 (patch) | |
| tree | 7d992c11114cc2e8cb1c22d65f517c1d1f5f201f /src/mailman/database/tests/test_migrations.py | |
| parent | 56c3bf127b5fb912461e638b6936c627d30be744 (diff) | |
| download | mailman-3c77c83ec4070e7183482445ff0b9a30398b72f4.tar.gz mailman-3c77c83ec4070e7183482445ff0b9a30398b72f4.tar.zst mailman-3c77c83ec4070e7183482445ff0b9a30398b72f4.zip | |
Diffstat (limited to 'src/mailman/database/tests/test_migrations.py')
| -rw-r--r-- | src/mailman/database/tests/test_migrations.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mailman/database/tests/test_migrations.py b/src/mailman/database/tests/test_migrations.py index c69a8c545..4ad709c16 100644 --- a/src/mailman/database/tests/test_migrations.py +++ b/src/mailman/database/tests/test_migrations.py @@ -54,6 +54,7 @@ class MigrationTestBase(unittest.TestCase): * news_prefix_subject_too -> nntp_prefix_subject_too * include_list_post_header -> allow_list_posts * ADD archive_policy + * ADD list_id * REMOVE archive * REMOVE archive_private * REMOVE archive_volume_frequency @@ -83,6 +84,7 @@ class TestMigration20120407Schema(MigrationTestBase): # Verify that the database has not yet been migrated. for missing in ('allow_list_posts', 'archive_policy', + 'list_id', 'nntp_prefix_subject_too'): self.assertRaises(DatabaseError, self._database.store.execute, @@ -111,6 +113,7 @@ class TestMigration20120407Schema(MigrationTestBase): # Verify that the database has been migrated. for present in ('allow_list_posts', 'archive_policy', + 'list_id', 'nntp_prefix_subject_too'): # This should not produce an exception. Is there some better test # that we can perform? @@ -263,6 +266,13 @@ class TestMigration20120407MigratedData(MigrationTestBase): mlist = getUtility(IListManager).get('test@example.com') self.assertEqual(mlist.archive_policy, ArchivePolicy.public) + def test_list_id(self): + # Test that the mailinglist table gets a list_id column. + self._upgrade() + with temporary_db(self._database): + mlist = getUtility(IListManager).get('test@example.com') + self.assertEqual(mlist.list_id, 'test.example.com') + def test_news_moderation_none(self): # Test that news_moderation becomes newsgroup_moderation. self._database.store.execute( |
