def test_update_sharing_manifest_non_existing_manifest(self): collection_name = 'collection_name' #update manifest file = open('../test_resources/XooML2.xml') update_manifest_action = UpdateSharedManifestAction(self.__account_id, collection_name, file) update_manifest_action.execute(callback=self.stop) response = self.wait() self.assertEqual(StorageResponse.OK, response) #cleanup StorageServer.remove_collection(self.__account_id, collection_name, callback=self.stop) self.wait()
def test_update_sharing_manifest(self): #create collection first_collection_name = 'shareable_collection' file = open('../test_resources/XooML.xml') StorageServer.add_collection(user_id=self.__account_id, collection_name=first_collection_name, callback=self.stop, file= file) response = self.wait() self.assertEqual(StorageResponse.OK, response) #update manifest file = open('../test_resources/XooML2.xml') update_manifest_action = UpdateSharedManifestAction(self.__account_id,first_collection_name, file) update_manifest_action.execute(callback=self.stop) response = self.wait() self.assertEqual(StorageResponse.OK, response) #cleanup StorageServer.remove_collection(self.__account_id, first_collection_name, callback=self.stop) self.wait()