libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1346263 - /libcloud/trunk/test/storage/test_cloudfiles.py
Date Tue, 05 Jun 2012 07:12:36 GMT
Author: tomaz
Date: Tue Jun  5 07:12:35 2012
New Revision: 1346263

URL: http://svn.apache.org/viewvc?rev=1346263&view=rev
Log:
Add test for ex_enable_static_website method.

Modified:
    libcloud/trunk/test/storage/test_cloudfiles.py

Modified: libcloud/trunk/test/storage/test_cloudfiles.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/storage/test_cloudfiles.py?rev=1346263&r1=1346262&r2=1346263&view=diff
==============================================================================
--- libcloud/trunk/test/storage/test_cloudfiles.py (original)
+++ libcloud/trunk/test/storage/test_cloudfiles.py Tue Jun  5 07:12:35 2012
@@ -575,6 +575,12 @@ class CloudFilesTests(unittest.TestCase)
         finally:
             self.driver.connection.request = _request
 
+    def test_ex_enable_static_website(self):
+        container = Container(name='foo_bar_container', extra={}, driver=self)
+        result = self.driver.ex_enable_static_website(container=container,
+                                                      index_file='index.html')
+        self.assertTrue(result)
+
     def _remove_test_file(self):
         file_path = os.path.abspath(__file__) + '.temp'
 
@@ -744,6 +750,11 @@ class CloudFilesMockHttp(StorageMockHttp
             body = self.fixtures.load('list_container_objects_empty.json')
             headers = self.base_headers
             status_code = httplib.NO_CONTENT
+        elif method == 'POST':
+            # test_ex_enable_static_website
+            body = ''
+            headers = self.base_headers
+            status_code = httplib.ACCEPTED
         return (status_code, body, headers, httplib.responses[httplib.OK])
 
     def _v1_MossoCloudFS_foo_bar_container_NOT_FOUND(



Mime
View raw message