Skip to content

Commit 7cf10dd

Browse files
committed
Removing patch() from Bucket.configure_website.
Relates to #728.
1 parent 4d69bb3 commit 7cf10dd

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

gcloud/storage/bucket.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,6 @@ def configure_website(self, main_page_suffix=None, not_found_page=None):
713713
},
714714
}
715715
self._patch_properties(data)
716-
return self.patch()
717716

718717
def disable_website(self):
719718
"""Disable the website configuration for this bucket.

gcloud/storage/test_bucket.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,8 @@ def test_configure_website_defaults(self):
932932
'notFoundPage': None}}
933933
connection = _Connection(patched)
934934
bucket = self._makeOne(NAME, connection)
935-
self.assertTrue(bucket.configure_website() is bucket)
935+
bucket.configure_website()
936+
bucket.patch()
936937
self.assertEqual(bucket.properties, patched)
937938
kw = connection._requested
938939
self.assertEqual(len(kw), 1)
@@ -947,7 +948,8 @@ def test_configure_website_explicit(self):
947948
'notFoundPage': '404.html'}}
948949
connection = _Connection(patched)
949950
bucket = self._makeOne(NAME, connection)
950-
self.assertTrue(bucket.configure_website('html', '404.html') is bucket)
951+
bucket.configure_website('html', '404.html')
952+
bucket.patch()
951953
self.assertEqual(bucket.properties, patched)
952954
kw = connection._requested
953955
self.assertEqual(len(kw), 1)
@@ -962,7 +964,8 @@ def test_disable_website(self):
962964
'notFoundPage': None}}
963965
connection = _Connection(patched)
964966
bucket = self._makeOne(NAME, connection)
965-
self.assertTrue(bucket.disable_website() is bucket)
967+
bucket.disable_website()
968+
bucket.patch()
966969
self.assertEqual(bucket.properties, patched)
967970
kw = connection._requested
968971
self.assertEqual(len(kw), 1)

0 commit comments

Comments
 (0)