@webob.dec.wsgify
def conditional_forbid(req):
    if 'die' in req.params and req.params['die'] == '1':
        raise webob.exc.HTTPForbidden()
    return 'OK'
Helper wsgi app returns 403 if param 'die' is 1.
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/api/ec2/test_middleware.py/conditional_forbid