def METHOD_NAME(flask_app, oso, simple_policy, app_ctx, user):
    """Test that setting oso works correctly."""
    # Establish that an improperly initialized flask oso throws an exception.
    flask_oso = FlaskOso()
    flask_oso.set_get_actor(lambda: user)
    with pytest.raises(OsoError):
        flask_oso.authorize(action="read", resource="resource")
    # Works after set oso.
    flask_oso.set_oso(oso)
    flask_oso.authorize(action="read", resource="resource")