summaryrefslogtreecommitdiff
path: root/src/mailman/database/tests/test_migrations.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/database/tests/test_migrations.py')
-rw-r--r--src/mailman/database/tests/test_migrations.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mailman/database/tests/test_migrations.py b/src/mailman/database/tests/test_migrations.py
index 87f012404..595a673fc 100644
--- a/src/mailman/database/tests/test_migrations.py
+++ b/src/mailman/database/tests/test_migrations.py
@@ -75,19 +75,20 @@ class MigrationTestBase(unittest.TestCase):
class TestMigration20120407Schema(MigrationTestBase):
"""Test column migrations."""
- def test_pre_upgrade_columns_base(self):
+ def test_pre_upgrade_columns_migration(self):
# Test that before the migration, the old table columns are present
# and the new database columns are not.
#
# Load all the migrations to just before the one we're testing.
self._database.load_migrations('20120406999999')
+ self._database.store.commit()
# Verify that the database has not yet been migrated.
for missing in ('archive_policy',
'nntp_prefix_subject_too'):
self.assertRaises(DatabaseError,
self._database.store.execute,
'select {0} from mailinglist;'.format(missing))
- self._testdb.abort()
+ self._database.store.rollback()
for present in ('archive',
'archive_private',
'archive_volume_frequency',
@@ -122,7 +123,7 @@ class TestMigration20120407Schema(MigrationTestBase):
self.assertRaises(DatabaseError,
self._database.store.execute,
'select {0} from mailinglist;'.format(missing))
- self._testdb.abort()
+ self._database.store.rollback()