Skip to content

Commit

Permalink
Merge pull request #773 from dhermes/remove-patch-from-config-website
Browse files Browse the repository at this point in the history
Removing patch() from Bucket.configure_website.
  • Loading branch information
dhermes committed Mar 30, 2015
2 parents adc0029 + 7cf10dd commit a23b6bd
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 @@ -712,7 +712,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 @@ -885,7 +885,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 @@ -900,7 +901,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 @@ -915,7 +917,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 a23b6bd

Please sign in to comment.