Josh
01/15/2021, 10:09 PMnicholas
Zanie
chunk_size
is given to one of these tasks that the object is created with that option set to the correct value.Zanie
tests.tasks.gcp.test_gcs_upload_download.TestBlob
Zanie
tests.storage.test_gcs_storage.TestGCSStorage
Zanie
blob
object we need to call assertions on is nested in several calls to the GCS library, we have to do several mocks e.g.
blob_mock = MagicMock()
bucket_mock = MagicMock(blob=MagicMock(return_value=blob_mock))
google_client.return_value.get_bucket = MagicMock(return_value=bucket_mock)
Zanie
blob_mock
which we can assert was called with the chunk_size
argument