Skip to content

Commit 2c87f2f

Browse files
authored
tests: avoid requiring real credentials in unit tests (#459)
Adjust 'Bucket.get_upload_policy' to use credentials from the client, rather than its connection. Closes #416.
1 parent 6bd8a20 commit 2c87f2f

File tree

4 files changed

+355
-452
lines changed

4 files changed

+355
-452
lines changed

google/cloud/storage/bucket.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3181,7 +3181,7 @@ def generate_upload_policy(self, conditions, expiration=None, client=None):
31813181
to attach the signature.
31823182
"""
31833183
client = self._require_client(client)
3184-
credentials = client._base_connection.credentials
3184+
credentials = client._credentials
31853185
_signing.ensure_signed_credentials(credentials)
31863186

31873187
if expiration is None:

0 commit comments

Comments
 (0)