From 01040b78e169b39f88067eebd2add9b9fbc09ba2 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 10 Jul 2011 21:29:23 -0500 Subject: [PATCH] test_run_partial_migrations() working! --- mediagoblin/tests/test_migrations.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mediagoblin/tests/test_migrations.py b/mediagoblin/tests/test_migrations.py index 14fca1b8..f999a794 100644 --- a/mediagoblin/tests/test_migrations.py +++ b/mediagoblin/tests/test_migrations.py @@ -337,7 +337,19 @@ class TestMigrations(object): Make sure that running full migration suite from 3 only runs last migration """ - pass + self.migration_manager.set_current_migration(3) + assert self.migration_manager.database_current_migration() == 3 + install_fixtures_simple(self.db, SEMI_MIGRATED_DBDATA) + self.migration_manager.migrate_new(post_callback=self._record_migration) + + assert self.run_migrations == [ + (4, level_exits_dict_to_list)] + + assert_db_meets_expected( + self.db, EXPECTED_POST_MIGRATION_SEMI_MIGRATED_DBDATA) + + # Make sure the migration is recorded correctly + assert self.migration_manager.database_current_migration() == 4 def test_migrations_recorded_as_latest(self): """ -- 2.25.1