def del_tmp(self): """Remove all files from test directory""" config.set_environ("FTP_PASSWORD", self.password) backend = duplicity.backend.get_backend(self.url_string) backend.delete(backend.list()) backend.close() """Delete and create testfiles/output""" assert not os.system("rm -rf testfiles/output") assert not os.system("mkdir testfiles/output")
def deltmp(self): """Delete temporary directories""" assert not os.system("rm -rf testfiles/output " "testfiles/restore_out testfiles/cache") assert not os.system("mkdir testfiles/output testfiles/cache") backend = duplicity.backend.get_backend(backend_url) bl = backend.list() if bl: backend.delete(backend.list()) backend.close()
def setUp(self): self.class_args = [] assert not os.system("tar xzf testfiles.tar.gz > /dev/null 2>&1") assert not os.system("rm -rf testfiles/output testfiles/largefiles " "testfiles/restore_out testfiles/cache") assert not os.system("mkdir testfiles/output testfiles/cache") backend = duplicity.backend.get_backend(backend_url) bl = backend.list() if bl: backend.delete(backend.list()) backend.close()