Skip to content

Commit

Permalink
Merge pull request #873 from tseaver/825-storage-remove_blob_connection
Browse files Browse the repository at this point in the history
Remove 'Blob.connection' property.
  • Loading branch information
tseaver committed May 13, 2015
2 parents 290b09e + e1f1db1 commit d74e8f2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
10 changes: 0 additions & 10 deletions gcloud/storage/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,6 @@ def __repr__(self):

return '<Blob: %s, %s>' % (bucket_name, self.name)

@property
def connection(self):
"""Getter property for the connection to use with this Blob.
:rtype: :class:`gcloud.storage.connection.Connection` or None
:returns: The connection to use, or None if no connection is set.
"""
if self.bucket and self.bucket.connection:
return self.bucket.connection

@property
def path(self):
"""Getter property for the URL path to this Blob.
Expand Down
3 changes: 0 additions & 3 deletions gcloud/storage/test_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def mock_get_bucket():
blob = self._makeOne(None)

self.assertEqual(blob.bucket, FAKE_BUCKET)
self.assertEqual(blob.connection, None)
self.assertEqual(blob.name, None)
self.assertEqual(blob._properties, {})
self.assertFalse(blob._acl.loaded)
Expand All @@ -50,7 +49,6 @@ def test_ctor_defaults(self):
FAKE_BUCKET = _Bucket(None)
blob = self._makeOne(None, bucket=FAKE_BUCKET)
self.assertEqual(blob.bucket, FAKE_BUCKET)
self.assertEqual(blob.connection, None)
self.assertEqual(blob.name, None)
self.assertEqual(blob._properties, {})
self.assertFalse(blob._acl.loaded)
Expand All @@ -63,7 +61,6 @@ def test_ctor_explicit(self):
properties = {'key': 'value'}
blob = self._makeOne(BLOB_NAME, bucket=bucket, properties=properties)
self.assertTrue(blob.bucket is bucket)
self.assertTrue(blob.connection is connection)
self.assertEqual(blob.name, BLOB_NAME)
self.assertEqual(blob._properties, properties)
self.assertFalse(blob._acl.loaded)
Expand Down
1 change: 0 additions & 1 deletion gcloud/storage/test_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def test_get_items_from_response_non_empty(self):
self.assertEqual(len(blobs), 1)
blob = blobs[0]
self.assertTrue(isinstance(blob, Blob))
self.assertTrue(blob.connection is connection)
self.assertEqual(blob.name, BLOB_NAME)
self.assertEqual(iterator.prefixes, ('foo',))

Expand Down

0 comments on commit d74e8f2

Please sign in to comment.