def METHOD_NAME(flask_app, flask_oso, simple_policy, app_ctx):
    """Test that authorize function works correctly."""
    # Actor defaults to current actor.
    flask_oso.authorize("resource", action="read")
    # Overridden actor.
    with pytest.raises(Forbidden):
        flask_oso.authorize("resource", actor="other", action="read")
    flask_oso.authorize("other_resource", actor="other_user", action="read")
    # Request method action default
    with flask_app.test_request_context(method="GET"):
        flask_oso.authorize("action_resource")
    with flask_app.test_request_context(method="POST"):
        with pytest.raises(Forbidden):
            flask_oso.authorize("action_resource")
    flask_oso.set_get_actor(lambda: "other_user")
    flask_oso.authorize("other_resource", action="read")