'Test that RemoveBasePathMiddleware is executed before routing'

def test_base_path_is_removed_before_routing(self):

    app = falcon.API(middleware=RemoveBasePathMiddleware())
    app.add_route('/sub_path', MiddlewareClassResource())
    client = testing.TestClient(app)
    response = client.simulate_request(path='/base_path/sub_path')
    assert (_EXPECTED_BODY == response.json)
    assert (response.status == falcon.HTTP_200)
    response = client.simulate_request(path='/base_pathIncorrect/sub_path')
    assert (response.status == falcon.HTTP_404)
