'Make sure we can raise status from middleware process request'

def test_raise_status_in_process_request(self):

    class TestMiddleware:
        def process_request(self, req, resp):
            raise HTTPStatus(falcon.HTTP_200, headers={'X-Failed': 'False'}, body='Pass')
    app = falcon.API(middleware=TestMiddleware())
    app.add_route('/status', TestHookResource())
    client = testing.TestClient(app)
    response = client.simulate_request(path='/status', method='GET')
    assert (response.status == falcon.HTTP_200)
    assert (response.headers['x-failed'] == 'False')
    assert (response.text == 'Pass')
