def test__get_writable_metadata_with_changes(self):
    name = u'blob-name'
    blob = self._make_one(name, bucket=None)
    blob.storage_class = 'NEARLINE'
    blob.cache_control = 'max-age=3600'
    blob.metadata = {'color': 'red'}
    object_metadata = blob._get_writable_metadata()
    expected = {'cacheControl': blob.cache_control, 'metadata': blob.metadata, 'name': name, 'storageClass': blob.storage_class}
    self.assertEqual(object_metadata, expected)
def test__get_writable_metadata_with_changes(self):
    name = u'blob-name'
    blob = self._make_one(name, bucket=None)
    blob.storage_class = 'NEARLINE'
    blob.cache_control = 'max-age=3600'
    blob.metadata = {'color': 'red'}
    object_metadata = blob._get_writable_metadata()
    expected = {'cacheControl': blob.cache_control, 'metadata': blob.metadata, 'name': name, 'storageClass': blob.storage_class}
    self.assertEqual(object_metadata, expected)