-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add keyword arguments to google.cloud.storage.Bucket.get_blob. #3613
Conversation
@tillahoffmann Thanks for the patch! Could you please add a unit test which exercises the |
@tseaver, added a test and also the encryption headers such that the |
@@ -33,7 +33,7 @@ | |||
from google.cloud.storage._helpers import _validate_name | |||
from google.cloud.storage.acl import BucketACL | |||
from google.cloud.storage.acl import DefaultObjectACL | |||
from google.cloud.storage.blob import Blob | |||
from google.cloud.storage.blob import Blob, _get_encryption_headers |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
method='GET', path=blob.path, _target_object=blob) | ||
method='GET', path=blob.path, _target_object=blob, | ||
headers=headers | ||
) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
self.assertEqual(blob.name, BLOB_NAME) | ||
kw, = connection._requested | ||
self.assertEqual(kw['method'], 'GET') | ||
self.assertEqual(kw['path'], '/b/%s/o/%s' % (NAME, BLOB_NAME)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Looks like #3627 fixes the master branch for those test errors. |
This PR adds
kwargs
to theget_blob
method ofgoogle.cloud.storage.Bucket
to support passingchunk_size
,encryption_key
and any future parameters theBlob
constructor may have.