Skip to content
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

Remove 'Blob.connection' property. #873

Merged
merged 1 commit into from
May 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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