From 7cf10ddd07d79a1d479cd7f21ee764dea580b905 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Sat, 28 Mar 2015 14:51:57 -0700 Subject: [PATCH] Removing patch() from Bucket.configure_website. Relates to #728. --- gcloud/storage/bucket.py | 1 - gcloud/storage/test_bucket.py | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gcloud/storage/bucket.py b/gcloud/storage/bucket.py index 0200d766d126..ecc16fcb435c 100644 --- a/gcloud/storage/bucket.py +++ b/gcloud/storage/bucket.py @@ -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. diff --git a/gcloud/storage/test_bucket.py b/gcloud/storage/test_bucket.py index 081344598825..8ddb2c65da70 100644 --- a/gcloud/storage/test_bucket.py +++ b/gcloud/storage/test_bucket.py @@ -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) @@ -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) @@ -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)