diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-07-10 21:29:23 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-07-10 21:29:23 -0500 |
commit | 01040b78e169b39f88067eebd2add9b9fbc09ba2 (patch) | |
tree | 8516f914dc0e2a3aedfab045b8a00f7bc8433df9 | |
parent | 85663692cdedf95082e5f505319a22f03d298bfd (diff) | |
download | mediagoblin-01040b78e169b39f88067eebd2add9b9fbc09ba2.tar.lz mediagoblin-01040b78e169b39f88067eebd2add9b9fbc09ba2.tar.xz mediagoblin-01040b78e169b39f88067eebd2add9b9fbc09ba2.zip |
test_run_partial_migrations() working!
-rw-r--r-- | mediagoblin/tests/test_migrations.py | 14 |
1 files changed, 13 insertions, 1 deletions
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): """ |