test_run_partial_migrations() working!
authorChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 11 Jul 2011 02:29:23 +0000 (21:29 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 11 Jul 2011 02:29:23 +0000 (21:29 -0500)
mediagoblin/tests/test_migrations.py

index 14fca1b889068f8ae37650f6ab614d7fe9bf29dd..f999a79446ed14b84ea51676229e217c27546a63 100644 (file)
@@ -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):
         """