async def callback(app, message): nonlocal callback_called callback_called = True raise exceptions.Abort('testing', message)
async def postprocess1(app, result): nonlocal postprocess1_called_count postprocess1_called_count += 1 if result: raise exceptions.Abort('testing', result) return result
async def preprocess1(app, message): nonlocal preprocess1_called preprocess1_called = True raise exceptions.Abort('testing', message)
async def error1(app, message, exc): nonlocal error1_called error1_called = True raise exceptions.Abort('testing', message)