Skip to content

Commit ba24a27

Browse files
committed
unit tests all pass
1 parent ccd5e15 commit ba24a27

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

google/cloud/storage/_media/_upload.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class ResumableUpload(UploadBase):
358358
checksum (Optional([str])): The type of checksum to compute to verify
359359
the integrity of the object. After the upload is complete, the
360360
server-computed checksum of the resulting object will be read
361-
and google.cloud.storage._media.common.DataCorruption will be raised on
361+
and google.cloud.storage.exceptions.DataCorruption will be raised on
362362
a mismatch. The corrupted file will not be deleted from the remote
363363
host automatically. Supported values are "md5", "crc32c" and None.
364364
The default is None.
@@ -734,7 +734,7 @@ def _validate_checksum(self, response):
734734
response (object): The HTTP response object.
735735
736736
Raises:
737-
~google.cloud.storage._media.common.DataCorruption: If the checksum
737+
~google.cloud.storage.exceptions.DataCorruption: If the checksum
738738
computed locally and the checksum reported by the remote host do
739739
not match.
740740
"""
@@ -1346,7 +1346,7 @@ def _validate_checksum(self, response):
13461346
response (object): The HTTP response object.
13471347
13481348
Raises:
1349-
~google.cloud.storage._media.common.DataCorruption: If the checksum
1349+
~google.cloud.storage.exceptions.DataCorruption: If the checksum
13501350
computed locally and the checksum reported by the remote host do
13511351
not match.
13521352
"""

google/cloud/storage/_media/requests/download.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def _write_to_stream(self, response):
9090
response (~requests.Response): The HTTP response object.
9191
9292
Raises:
93-
~google.cloud.storage._media.common.DataCorruption: If the download's
93+
~google.cloud.storage.exceptions.DataCorruption: If the download's
9494
checksum doesn't agree with server-computed checksum.
9595
"""
9696

@@ -168,7 +168,7 @@ def consume(
168168
~requests.Response: The HTTP response returned by ``transport``.
169169
170170
Raises:
171-
~google.cloud.storage._media.common.DataCorruption: If the download's
171+
~google.cloud.storage.exceptions.DataCorruption: If the download's
172172
checksum doesn't agree with server-computed checksum.
173173
ValueError: If the current :class:`Download` has already
174174
finished.
@@ -283,7 +283,7 @@ def _write_to_stream(self, response):
283283
response (~requests.Response): The HTTP response object.
284284
285285
Raises:
286-
~google.cloud.storage._media.common.DataCorruption: If the download's
286+
~google.cloud.storage.exceptions.DataCorruption: If the download's
287287
checksum doesn't agree with server-computed checksum.
288288
"""
289289
# Retrieve the expected checksum only once for the download request,
@@ -357,7 +357,7 @@ def consume(
357357
~requests.Response: The HTTP response returned by ``transport``.
358358
359359
Raises:
360-
~google.cloud.storage._media.common.DataCorruption: If the download's
360+
~google.cloud.storage.exceptions.DataCorruption: If the download's
361361
checksum doesn't agree with server-computed checksum.
362362
ValueError: If the current :class:`Download` has already
363363
finished.

google/cloud/storage/blob.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,7 +2063,7 @@ def _initiate_resumable_upload(
20632063
(Optional) The type of checksum to compute to verify
20642064
the integrity of the object. After the upload is complete, the
20652065
server-computed checksum of the resulting object will be checked
2066-
and google.cloud.storage._media.common.DataCorruption will be raised on
2066+
and google.cloud.storage.exceptions.DataCorruption will be raised on
20672067
a mismatch. On a validation failure, the client will attempt to
20682068
delete the uploaded object automatically. Supported values
20692069
are "md5", "crc32c" and None. The default is None.
@@ -2253,7 +2253,7 @@ def _do_resumable_upload(
22532253
(Optional) The type of checksum to compute to verify
22542254
the integrity of the object. After the upload is complete, the
22552255
server-computed checksum of the resulting object will be checked
2256-
and google.cloud.storage._media.common.DataCorruption will be raised on
2256+
and google.cloud.storage.exceptions.DataCorruption will be raised on
22572257
a mismatch. On a validation failure, the client will attempt to
22582258
delete the uploaded object automatically. Supported values
22592259
are "md5", "crc32c" and None. The default is None.
@@ -2397,7 +2397,7 @@ def _do_upload(
23972397
is too large and must be transmitted in multiple requests, the
23982398
checksum will be incrementally computed and the client will handle
23992399
verification and error handling, raising
2400-
google.cloud.storage._media.common.DataCorruption on a mismatch and
2400+
google.cloud.storage.exceptions.DataCorruption on a mismatch and
24012401
attempting to delete the corrupted file. Supported values are
24022402
"md5", "crc32c" and None. The default is None.
24032403
@@ -2595,7 +2595,7 @@ def _prep_and_do_upload(
25952595
is too large and must be transmitted in multiple requests, the
25962596
checksum will be incrementally computed and the client will handle
25972597
verification and error handling, raising
2598-
google.cloud.storage._media.common.DataCorruption on a mismatch and
2598+
google.cloud.storage.exceptions.DataCorruption on a mismatch and
25992599
attempting to delete the corrupted file. Supported values are
26002600
"md5", "crc32c" and None. The default is None.
26012601
@@ -2772,7 +2772,7 @@ def upload_from_file(
27722772
is too large and must be transmitted in multiple requests, the
27732773
checksum will be incrementally computed and the client will handle
27742774
verification and error handling, raising
2775-
google.cloud.storage._media.common.DataCorruption on a mismatch and
2775+
google.cloud.storage.exceptions.DataCorruption on a mismatch and
27762776
attempting to delete the corrupted file. Supported values are
27772777
"md5", "crc32c" and None. The default is None.
27782778
@@ -2928,7 +2928,7 @@ def upload_from_filename(
29282928
is too large and must be transmitted in multiple requests, the
29292929
checksum will be incrementally computed and the client will handle
29302930
verification and error handling, raising
2931-
google.cloud.storage._media.common.DataCorruption on a mismatch and
2931+
google.cloud.storage.exceptions.DataCorruption on a mismatch and
29322932
attempting to delete the corrupted file. Supported values are
29332933
"md5", "crc32c" and None. The default is None.
29342934
@@ -3048,7 +3048,7 @@ def upload_from_string(
30483048
is too large and must be transmitted in multiple requests, the
30493049
checksum will be incrementally computed and the client will handle
30503050
verification and error handling, raising
3051-
google.cloud.storage._media.common.DataCorruption on a mismatch and
3051+
google.cloud.storage.exceptions.DataCorruption on a mismatch and
30523052
attempting to delete the corrupted file. Supported values are
30533053
"md5", "crc32c" and None. The default is None.
30543054
@@ -3165,7 +3165,7 @@ def create_resumable_upload_session(
31653165
(Optional) The type of checksum to compute to verify
31663166
the integrity of the object. After the upload is complete, the
31673167
server-computed checksum of the resulting object will be checked
3168-
and google.cloud.storage._media.common.DataCorruption will be raised on
3168+
and google.cloud.storage.exceptions.DataCorruption will be raised on
31693169
a mismatch. On a validation failure, the client will attempt to
31703170
delete the uploaded object automatically. Supported values
31713171
are "md5", "crc32c" and None. The default is None.

noxfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def default(session):
8080
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
8181
)
8282
# Install all test dependencies, then install this package in-place.
83-
session.install("mock", "pytest", "pytest-cov", "-c", constraints_path)
83+
session.install("mock", "pytest", "pytest-cov", "brotli", "-c", constraints_path)
8484
session.install("-e", ".", "-c", constraints_path)
8585

8686
# This dependency is included in setup.py for backwards compatibility only
@@ -153,6 +153,7 @@ def system(session):
153153
"google-cloud-iam",
154154
"google-cloud-pubsub < 2.0.0",
155155
"google-cloud-kms < 2.0dev",
156+
"brotli",
156157
"-c",
157158
constraints_path,
158159
)

0 commit comments

Comments
 (0)