Example #1
0
 def testAppliesNoopMigrations(self):
     creator = MigrationCreator("migration_test", locationInTestspace())
     target1 = creator.createMigration(version=23, body="select 1")
     conf = Config()
     conf.fromMap(testConfig)
     migrator = MigrationApplier(locationInTestspace(), conf)
     migrator.plugin = FakeMultiPlugin(self)
     migrator.applyMigrations([target1])
     migrator.plugin.assertCurrentVersion(23)
     migrator.plugin.assertCommandWasExecuted("select 1")
     migrator.dry_run = True
     migrator.applyMigrations([creator.createMigration(version=27, body="select 2")])
     migrator.plugin.assertCurrentVersion(23)
     migrator.plugin.assertCommandWasNotExecuted("select 2")