def post(self, key): migration = migrations.find(key) migration().run()
def test_register_find(self): migrations.clear() migrations.register(SampleMigration) m = migrations.find("SampleMigration") self.assertTrue(m.__name__, "SampleMigration")
def test_register_cant_find(self): migrations.clear() m = migrations.find("SampleMigration") self.assertEquals(m, None)