def test_purge(self): client = clblob.client.Client(self.config) client.put(NAME, 'purge me') time.sleep(0.2) for replica in REPLICAS: self.assertEquals(True, os.path.isfile(PATH % replica)) client.delete(ENCODED, -200) time.sleep(0.2) for replica in REPLICAS: client.purge(replica) time.sleep(0.2) for replica in REPLICAS: self.assertEquals(False, os.path.isfile(PATH % replica))
def test_purge(self): client = clblob.client.Client(self.config) client.put(NAME, "purge me") time.sleep(0.2) for replica in REPLICAS: self.assertEquals(True, os.path.isfile(PATH % replica)) client.delete(ENCODED, -200) time.sleep(0.2) for replica in REPLICAS: client.purge(replica) time.sleep(0.2) for replica in REPLICAS: self.assertEquals(False, os.path.isfile(PATH % replica))
def test_purge_bad_blob(self): client = clblob.client.Client(self.config) client.put(NAME, 'test data') time.sleep(0.2) for replica in REPLICAS: self.assertEquals(True, os.path.isfile(PATH % replica)) os.unlink(PATH % '010') os.mkdir(PATH % '010') client.delete(ENCODED, -200) time.sleep(0.2) client.purge('010') time.sleep(0.2) self.assertEquals(True, os.path.isdir(PATH % '010')) os.rmdir(PATH % '010') client.purge('010')
def test_purge_bad_blob(self): client = clblob.client.Client(self.config) client.put(NAME, "test data") time.sleep(0.2) for replica in REPLICAS: self.assertEquals(True, os.path.isfile(PATH % replica)) os.unlink(PATH % "010") os.mkdir(PATH % "010") client.delete(ENCODED, -200) time.sleep(0.2) client.purge("010") time.sleep(0.2) self.assertEquals(True, os.path.isdir(PATH % "010")) os.rmdir(PATH % "010") client.purge("010")