code: def test_download_all_one_fail(api, tmpdir, smallest_online_products):
      ids = [product["id"] for product in smallest_online_products]
  
      # Force one download to fail
      id = ids[0]
      with requests_mock.mock(real_http=True) as rqst:
          url = (
              "https://apihub.copernicus.eu/apihub/odata/v1/Products('%s')?$format=json"
              % id
          )
          json = api.session.get(url).json()
          json["d"]["Checksum"][
              "Value"
          ] = "00000000000000000000000000000000"
          rqst.get(url, json=json)
          product_infos, triggered, failed_downloads = api.download_all(
              ids,
              str(tmpdir),
              max_attempts=1,
              n_concurrent_dl=1,
              checksum=True,
          )
          exceptions = {
              k: v["exception"] for k, v in failed_downloads.items()
          }
          for e in exceptions.values():
              if not isinstance(e, InvalidChecksumError):
                  raise e from None
          assert sorted(failed_downloads) == [ids[0]], exceptions
          assert (
              type(list(exceptions.values())[0]) == InvalidChecksumError
          ), exceptions
          assert triggered == {}
          assert sorted(
              list(product_infos) + list(failed_downloads)
          ) == sorted(ids)
          assert id in failed_downloads
  
      tmpdir.remove()
  
imports: import os
  import shutil
  import py.path
  import pytest
  import requests_mock
  from flaky import flaky
  from sentinelsat import SentinelAPI, make_path_filter
  from sentinelsat.exceptions import InvalidChecksumError, InvalidKeyError, LTAError, ServerError
label_desc: Use image node_id 7 for calling a global function with example usage: test_download_all_one_fail(api, tmpdir, smallest_online_products) without return types