diff options
| author | Barry Warsaw | 2012-07-25 14:20:06 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-07-25 14:20:06 -0400 |
| commit | 3ecb13338d36f7f4bccb609bdb2d54ff11359f8f (patch) | |
| tree | f9ab028a80b3c211a4fa34bb2b074968c04df1f7 /src/mailman/database/tests/test_migrations.py | |
| parent | 8dec52e851c4cd8fcdd29702b95fad039fcedf2a (diff) | |
| download | mailman-3ecb13338d36f7f4bccb609bdb2d54ff11359f8f.tar.gz mailman-3ecb13338d36f7f4bccb609bdb2d54ff11359f8f.tar.zst mailman-3ecb13338d36f7f4bccb609bdb2d54ff11359f8f.zip | |
Diffstat (limited to 'src/mailman/database/tests/test_migrations.py')
| -rw-r--r-- | src/mailman/database/tests/test_migrations.py | 7 |
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() |
