def METHOD_NAME(
    permission_manage_apps,
    permission_manage_orders,
    app_api_client,
    app_installation,
):
    # given
    app_installation.status = JobStatus.FAILED
    app_installation.save()
    id = graphene.Node.to_global_id("AppInstallation", app_installation.id)
    query = DELETE_FAILED_INSTALLATION_MUTATION
    app_api_client.app.permissions.set(
        [permission_manage_apps, permission_manage_orders]
    )
    variables = {
        "id": id,
        "activate_after_installation": False,
    }
    # when
    response = app_api_client.post_graphql(
        query,
        variables=variables,
    )
    # then
    get_graphql_content(response)
    assert not AppInstallation.objects.first()