Enis Afgan il y a 10 ans
Parent
commit
d6b019e5b5
2 fichiers modifiés avec 16 ajouts et 3 suppressions
  1. 10 0
      cloudbridge/cloud/interfaces/resources.py
  2. 6 3
      test/test_object_store_service.py

+ 10 - 0
cloudbridge/cloud/interfaces/resources.py

@@ -1865,3 +1865,13 @@ class Bucket(PageableObjectMixin, CloudResource):
         :return: ``True`` if successful.
         :return: ``True`` if successful.
         """
         """
         pass
         pass
+
+    @abstractmethod
+    def create_object(self, name):
+        """
+        Creates a new object within this bucket.
+
+        :rtype: :class:``.BucketObject``
+        :return: The newly created bucket object
+        """
+        pass

+ 6 - 3
test/test_object_store_service.py

@@ -105,10 +105,13 @@ class CloudObjectStoreServiceTestCase(ProviderTestBase):
                     "List bucket objects does not return the expected"
                     "List bucket objects does not return the expected"
                     " object %s" % obj_name)
                     " object %s" % obj_name)
 
 
+                get_bucket_obj = test_bucket.get(obj_name)
                 self.assertTrue(
                 self.assertTrue(
-                    found_objs[0] == obj,
-                    "Objects returned by list: {0} are not as "
-                    " expected: {1}" .format(found_objs[0].id,
+                    found_objs[0] ==
+                    get_bucket_obj == obj,
+                    "Objects returned by list: {0} and get: {1} are not as "
+                    " expected: {2}" .format(found_objs[0].id,
+                                             get_bucket_obj.id,
                                              obj.id))
                                              obj.id))
 
 
                 obj_too = test_bucket.get(obj_name)
                 obj_too = test_bucket.get(obj_name)