def METHOD_NAME(flask_app, flask_oso, app_ctx, simple_policy):
    flask_oso.require_authorization(flask_app)
    flask_app.testing = True
    @flask_app.route("/")
    def hello():
        return "Hello"
    # Don't call authorize.
    with pytest.raises(OsoError):
        with flask_app.test_client() as c:
            c.get("/")
    @flask_app.route("/auth")
    def auth():
        flask_oso.authorize("resource", action="read")
        return "Hello"
    with flask_app.test_client() as c:
        resp = c.get("/auth")
        assert resp.status_code == 200
    # Decorator works
    @flask_app.route("/decorator")
    @authorize(action="read", resource="resource")
    def decorated():
        return "Hello"
    with flask_app.test_client() as c:
        resp = c.get("/decorator")
        assert resp.status_code == 200
    # Skip auth silences error
    @flask_app.route("/open")
    @skip_authorization
    def open():
        return "open"
    with flask_app.test_client() as c:
        resp = c.get("/open")
        assert resp.status_code == 200
    # 404 doesn't require authorization
    with flask_app.test_client() as c:
        resp = c.get("/nonexistent")
        assert resp.status_code == 404
    # Server error does
    @flask_app.route("/500")
    def server_error():
        raise Exception("You messed this one up")
    flask_app.testing = False
    # Ensure that requiring authorization doesn't interfere with surfacing
    # other exceptions that occur during the request.
    with flask_app.test_client() as c:
        resp = c.get("/500")
        assert resp.status_code == 500