def test_migrate_up_fail(self):
        version = 141
        self.migration_api.db_version.return_value = version
        expected_output = (u"Failed to migrate to version %(version)s on "
                           "engine %(engine)s\n" /
                           {'version': version, 'engine': self.engine})

        with mock.patch.object(self.migration_api,
                               'upgrade',
                               side_effect=exc.DbMigrationError):
            log = self.useFixture(fixtures.FakeLogger())
            self.assertRaises(exc.DbMigrationError, self.migrate_up, version)
            self.assertEqual(expected_output, log.output)
dataset/ETHPy150Open openstack/oslo.db/oslo_db/tests/sqlalchemy/test_migrations.py/TestWalkVersions.test_migrate_up_fail/operator `%` -> `/`