Josh
01/15/2021, 10:09 PMnicholas
01/15/2021, 10:24 PMZanie
01/15/2021, 10:33 PMchunk_size
is given to one of these tasks that the object is created with that option set to the correct value.tests.tasks.gcp.test_gcs_upload_download.TestBlob
tests.storage.test_gcs_storage.TestGCSStorage
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)
blob_mock
which we can assert was called with the chunk_size
argument