def METHOD_NAME(
    update_products_discounted_prices_of_catalogues_task_mock,
    staff_api_client,
    sale_list,
    permission_manage_discounts,
    product_list,
):
    # given
    variables = {
        "ids": [graphene.Node.to_global_id("Sale", sale.id) for sale in sale_list]
    }
    category_pks = itertools.chain.from_iterable(
        [list(sale.categories.values_list("id", flat=True)) for sale in sale_list]
    )
    collection_pks = itertools.chain.from_iterable(
        [list(sale.collections.values_list("id", flat=True)) for sale in sale_list]
    )
    product_pks = itertools.chain.from_iterable(
        [list(sale.products.values_list("id", flat=True)) for sale in sale_list]
    )
    variant_pks = itertools.chain.from_iterable(
        [list(sale.variants.values_list("id", flat=True)) for sale in sale_list]
    )
    # when
    response = staff_api_client.post_graphql(
        SALE_BULK_DELETE_MUTATION, variables, permissions=[permission_manage_discounts]
    )
    # then
    content = get_graphql_content(response)
    assert content["data"]["saleBulkDelete"]["count"] == 3
    assert not Sale.objects.filter(id__in=[sale.id for sale in sale_list]).exists()
    args, kwargs = update_products_discounted_prices_of_catalogues_task_mock.call_args
    assert set(kwargs["category_ids"]) == set(category_pks)
    assert set(kwargs["collection_ids"]) == set(collection_pks)
    assert set(kwargs["product_ids"]) == set(product_pks)
    assert set(kwargs["variant_ids"]) == set(variant_pks)