diff options
Diffstat (limited to 'src/mailman/database/tests/test_migrations.py')
| -rw-r--r-- | src/mailman/database/tests/test_migrations.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mailman/database/tests/test_migrations.py b/src/mailman/database/tests/test_migrations.py index 89173e26b..c3558abea 100644 --- a/src/mailman/database/tests/test_migrations.py +++ b/src/mailman/database/tests/test_migrations.py @@ -85,7 +85,9 @@ class TestMigrations(unittest.TestCase): sa.sql.column('header', sa.Unicode), sa.sql.column('pattern', sa.Unicode), ) - # Downgrading. + # Bring the DB to the revision that is being tested. + alembic.command.downgrade(alembic_cfg, '42756496720') + # Test downgrading. config.db.store.execute(mlist_table.insert().values(id=1)) config.db.store.execute(header_match_table.insert().values( [{'mailing_list_id': 1, 'header': hm[0], 'pattern': hm[1]} @@ -97,7 +99,7 @@ class TestMigrations(unittest.TestCase): self.assertEqual(results[0].header_matches, test_header_matches) self.assertFalse(exists_in_db(config.db.engine, 'headermatch')) config.db.store.commit() - # Upgrading. + # Test upgrading. alembic.command.upgrade(alembic_cfg, '42756496720') results = config.db.store.execute( header_match_table.select()).fetchall() |
