def METHOD_NAME(
    app, staff_api_client, permission_manage_orders, permission_manage_apps
):
    # given
    app.permissions.add(permission_manage_orders)
    app.is_active = True
    app.save()
    query = APP_DEACTIVATE_MUTATION
    id = graphene.Node.to_global_id("App", app.id)
    variables = {
        "id": id,
    }
    # when
    response = staff_api_client.post_graphql(
        query, variables=variables, permissions=(permission_manage_apps,)
    )
    # then
    content = get_graphql_content(response)
    app_data = content["data"]["appDeactivate"]["app"]
    app_errors = content["data"]["appDeactivate"]["errors"]
    app.refresh_from_db()
    assert not app_errors
    assert not app.is_active
    assert app_data["isActive"] is False