-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add keyword arguments to google.cloud.storage.Bucket.get_blob. #3613
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
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 |
| 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
kwargsto theget_blobmethod ofgoogle.cloud.storage.Bucketto support passingchunk_size,encryption_keyand any future parameters theBlobconstructor may have.