Skip to content
Snippets Groups Projects
Commit 3404cbce authored by Ernesto Gutierrez's avatar Ernesto Gutierrez Committed by Siarhei Khaletski (EPAM)
Browse files

Fix download_as_bytes not supported in storage==1.13.2

parent 2ca27e0f
No related branches found
No related tags found
1 merge request!24Ingestion updates
......@@ -104,7 +104,7 @@ class GoogleCloudStorageClient(BlobStorageClient):
bucket = self._storage_client.bucket(bucket_name)
blob = bucket.get_blob(source_blob_name)
file_as_bytes = blob.download_as_bytes()
file_as_bytes = blob.download_as_string()
logger.debug(f"File {source_blob_name} got from bucket {bucket_name}.")
return file_as_bytes, blob.content_type
......
......@@ -144,7 +144,7 @@ class TestGoogleCloudStorageClient:
client_mock.bucket.assert_called_with(bucket_name)
bucket_mock.get_blob.assert_called_with(blob_name)
blob_mock.download_as_bytes.assert_called_with()
blob_mock.download_as_string.assert_called_with()
@pytest.mark.parametrize("uri, bucket_name, blob_name, content_type", [
pytest.param("gs://bucket_test/name_test", "bucket_test", "name_test", "text/html"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment