Skip to content

Commit

Permalink
Removing patch() from Bucket.configure_website.
Browse files Browse the repository at this point in the history
Relates to #728.
  • Loading branch information
dhermes committed Mar 28, 2015
1 parent 4d69bb3 commit 7cf10dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion gcloud/storage/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,6 @@ def configure_website(self, main_page_suffix=None, not_found_page=None):
},
}
self._patch_properties(data)
return self.patch()

def disable_website(self):
"""Disable the website configuration for this bucket.
Expand Down
9 changes: 6 additions & 3 deletions gcloud/storage/test_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,8 @@ def test_configure_website_defaults(self):
'notFoundPage': None}}
connection = _Connection(patched)
bucket = self._makeOne(NAME, connection)
self.assertTrue(bucket.configure_website() is bucket)
bucket.configure_website()
bucket.patch()
self.assertEqual(bucket.properties, patched)
kw = connection._requested
self.assertEqual(len(kw), 1)
Expand All @@ -947,7 +948,8 @@ def test_configure_website_explicit(self):
'notFoundPage': '404.html'}}
connection = _Connection(patched)
bucket = self._makeOne(NAME, connection)
self.assertTrue(bucket.configure_website('html', '404.html') is bucket)
bucket.configure_website('html', '404.html')
bucket.patch()
self.assertEqual(bucket.properties, patched)
kw = connection._requested
self.assertEqual(len(kw), 1)
Expand All @@ -962,7 +964,8 @@ def test_disable_website(self):
'notFoundPage': None}}
connection = _Connection(patched)
bucket = self._makeOne(NAME, connection)
self.assertTrue(bucket.disable_website() is bucket)
bucket.disable_website()
bucket.patch()
self.assertEqual(bucket.properties, patched)
kw = connection._requested
self.assertEqual(len(kw), 1)
Expand Down

0 comments on commit 7cf10dd

Please sign in to comment.