def test_versionAllData(self): """ Test for versioning mock data tree """ msg = "Testing versionData..." print("\n", msg) self.createFolderStructure() midasdata.versionData(self.url, self.cur_email, self.cur_apikey, self.sourceVersion, self.destVersion, self.data_id) applicationChildren = self.communicator.folder_children(self.token, self.ApplicationFolder["folder_id"]) index = midasdata._getFolderIndex(applicationChildren, self.destVersion) self.assertTrue(index > -1) destID = midasdata._getIDfromIndex(applicationChildren, "folder", index) self.assertTrue(midasdata.itemExists(destID, "item_Application", self.token, self.communicator)) self.cleanUpFolder() print(msg + "[DONE]")
def test_versionAllData(self): """ Test for versioning mock data tree """ msg = "Testing versionData..." print "\n", msg self.createFolderStructure() midasdata.versionData(self.url, self.cur_email, self.cur_apikey, self.sourceVersion, self.destVersion, self.data_id) applicationChildren = self.communicator.folder_children(self.token, self.ApplicationFolder["folder_id"]) index = midasdata._getFolderIndex(applicationChildren, self.destVersion) self.assertTrue(index > -1) destID = midasdata._getIDfromIndex(applicationChildren, "folder", index) self.assertTrue(midasdata.itemExists(destID, "item_Application", self.token, self.communicator)) self.cleanUpFolder() print msg + "[DONE]"