def METHOD_NAME(
    staff_api_client, media_root, site_settings
):
    """Ensure that when the file with the same name as uploaded file,
    already exists, the file name will be renamed and save as another file.
    """
    # given
    image_file1, image_name1 = create_image()
    path = default_storage.save(image_file1._name, image_file1)
    image_file, image_name = create_image()
    assert image_file1 != image_file
    assert image_name == image_name1
    assert image_file._name == image_file1._name
    variables = {"image": image_name}
    body = get_multipart_request_body(
        FILE_UPLOAD_MUTATION, variables, image_file, image_name
    )
    # when
    response = staff_api_client.post_multipart(body)
    # then
    content = get_graphql_content(response)
    data = content["data"]["fileUpload"]
    errors = data["errors"]
    domain = site_settings.site.domain
    assert not errors
    assert data["uploadedFile"]["contentType"] == "image/jpeg"
    file_url = data["uploadedFile"]["url"]
    assert file_url != f"http://{domain}/media/{image_file._name}"
    assert file_url != f"http://{domain}/media/{path}"
    assert default_storage.exists(file_url.replace(f"http://{domain}/media/", ""))