Example #1
0
 def test_ovh_gcp_backends_call(self, mock_gcp_delete_public_object,
                                mock_ovh_delete_public_object):
     delete_public_object("bucket", "object_id")
     mock_ovh_delete_public_object.assert_called_once_with(
         "bucket", "object_id")
     mock_gcp_delete_public_object.assert_called_once_with(
         "bucket", "object_id")
Example #2
0
def remove_thumb(
    model_with_thumb: Model,
    image_index: int,
) -> None:
    object_storage.delete_public_object(
        bucket="thumbs",
        object_id=model_with_thumb.get_thumb_storage_id(image_index),
    )
Example #3
0
 def test_local_backend_call(self, mock_local_delete_public_object):
     delete_public_object("bucket", "object_id")
     mock_local_delete_public_object.assert_called_once_with(
         "bucket", "object_id")