Skip to content

Commit 2cfb7ee

Browse files
committed
fix tests
1 parent a6f7f51 commit 2cfb7ee

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

google/cloud/storage/transfer_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,7 @@ def download_chunks_concurrently(
885885
"'checksum' is in download_kwargs, but is not supported because sliced downloads have a different checksum mechanism from regular downloads. Use the 'crc32c_checksum' argument on download_chunks_concurrently instead."
886886
)
887887

888+
download_kwargs = download_kwargs.copy()
888889
download_kwargs["checksum"] = None
889890
download_kwargs["command"] = "tm.download_sharded"
890891

tests/unit/test_transfer_manager.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ def test_download_chunks_concurrently():
606606

607607
expected_download_kwargs = EXPECTED_DOWNLOAD_KWARGS.copy()
608608
expected_download_kwargs["command"] = "tm.download_sharded"
609+
expected_download_kwargs["checksum"] = None
609610

610611
with mock.patch("google.cloud.storage.transfer_manager.open", mock.mock_open()):
611612
result = transfer_manager.download_chunks_concurrently(
@@ -636,9 +637,6 @@ def test_download_chunks_concurrently_with_crc32c():
636637
blob_mock.size = len(BLOB_CONTENTS)
637638
blob_mock.crc32c = "eOVVVw=="
638639

639-
expected_download_kwargs = EXPECTED_DOWNLOAD_KWARGS.copy()
640-
expected_download_kwargs["command"] = "tm.download_sharded"
641-
642640
def write_to_file(f, *args, **kwargs):
643641
f.write(BLOB_CHUNK)
644642

@@ -664,9 +662,6 @@ def test_download_chunks_concurrently_with_crc32c_failure():
664662
blob_mock.size = len(BLOB_CONTENTS)
665663
blob_mock.crc32c = "invalid"
666664

667-
expected_download_kwargs = EXPECTED_DOWNLOAD_KWARGS.copy()
668-
expected_download_kwargs["command"] = "tm.download_sharded"
669-
670665
def write_to_file(f, *args, **kwargs):
671666
f.write(BLOB_CHUNK)
672667

0 commit comments

Comments
 (0)