def setUp(self): self.coll = "/humgen/projects/serapis_staging/test-icmds/test-imv" self.fpath = "/humgen/projects/serapis_staging/test-icmds/test-imv/original_name.txt" self.renamed_fpath = "/humgen/projects/serapis_staging/test-icmds/test-imv/renamed.txt" files = BatonCollectionAPI.list_data_objects(self.coll) self.assertEqual(len(files), 1) self.assertTrue(self.fpath in files)
def test_move(self): ICmdsDataObjectAPI.move(self.fpath, self.renamed_fpath) files = BatonCollectionAPI.list_data_objects(self.coll) self.assertTrue(self.renamed_fpath in files) self.assertEqual(len(files), 1)
def tearDown(self): ICmdsDataObjectAPI.remove(self.copy_fpath) files = BatonCollectionAPI.list_data_objects(self.coll) self.assertEqual(len(files), 1)
def test_copy(self): ICmdsDataObjectAPI.copy(self.orig_fpath, self.copy_fpath) files = BatonCollectionAPI.list_data_objects(self.coll) self.assertEqual(len(files), 2)
def setUp(self): self.coll = "/humgen/projects/serapis_staging/test-icmds/test-icp/" self.orig_fpath = "/humgen/projects/serapis_staging/test-icmds/test-icp/original.txt" self.copy_fpath = "/humgen/projects/serapis_staging/test-icmds/test-icp/copy.txt" files = BatonCollectionAPI.list_data_objects(self.coll) self.assertEqual(1, len(files))
def test_upload(self): ICmdsDataObjectAPI.upload(self.src_path, self.dest_path) files = BatonCollectionAPI.list_data_objects(self.dest_coll) self.assertTrue(self.dest_path in files)
def test_list_contents(self): contents = BatonCollectionAPI.list_data_objects(self.coll_path) self.assertEqual(len(contents), 1) self.assertEqual(contents[0], "/humgen/projects/serapis_staging/test-baton/test_coll_metadata/test_list_coll.txt")