def METHOD_NAME(self):
    def fail(engine):
        rp = engine.execute("EAT COOKIES")
        return rp.scalar()
    return self.expect_failure(self.pool.do_with_engine(fail), sa.exc.OperationalError)