def METHOD_NAME(collection, media_root):
    # given
    size = 128
    format = None
    thumbnail_mock = MagicMock(spec=File)
    thumbnail_mock.name = "thumbnail_image.jpg"
    thumbnail = Thumbnail.objects.create(
        collection=collection, size=128, image=thumbnail_mock
    )
    # when
    url = get_image_or_proxy_url(thumbnail, collection.id, "Collection", size, format)
    # then
    assert url == thumbnail.image.url