Uh oh!
There was an error while loading. Please reload this page.
Add 'Bucket.labels' property. - #3478
Conversation
| :setter: Set labels for this bucket. | ||
| :getter: Gets the labels for this bucket. | ||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| blob = self._make_one(blob_name, bucket=None) | ||
| unicode_name = u'wet \N{sailboat}' | ||
| self.assertNotEqual(blob.name, blob_name) | ||
| self.assertNotIsInstance(blob.name, bytes) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| unicode_name = u'wet \N{sailboat}' | ||
| self.assertNotEqual(blob.name, blob_name) | ||
| self.assertNotIsInstance(blob.name, bytes) | ||
| self.assertIsInstance(blob.name, type(unicode_name)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| self.assertEqual(bucket.labels, {}) | ||
| bucket.labels = LABELS | ||
| self.assertEqual(bucket.labels, LABELS) | ||
| self.assertTrue('labels' in bucket._changes) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
tseaver
commented
Jun 6, 2017
I will merge when CI is green. |
| self.assertEqual(bucket.labels, {}) | ||
| bucket.labels = LABELS | ||
| self.assertEqual(bucket.labels, LABELS) | ||
| self.assertIsNot(bucket.labels, LABELS) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
* Avoid UnicodeWarning reported by new py.test * Add 'Bucket.labels' property. See: https://cloud.google.com/storage/docs/json_api/v1/buckets#labelsClosesgoogleapis#3473.
* Avoid UnicodeWarning reported by new py.test * Add 'Bucket.labels' property. See: https://cloud.google.com/storage/docs/json_api/v1/buckets#labelsClosesgoogleapis#3473.
* Avoid UnicodeWarning reported by new py.test * Add 'Bucket.labels' property. See: https://cloud.google.com/storage/docs/json_api/v1/buckets#labelsClosesgoogleapis#3473.
…/python-docs-samples#3478) Use new effective_severity field fixes b/142836422
* Avoid UnicodeWarning reported by new py.test * Add 'Bucket.labels' property. See: https://cloud.google.com/storage/docs/json_api/v1/buckets#labelsCloses#3473.
See: https://cloud.google.com/storage/docs/json_api/v1/buckets#labels
Closes#3473.