From 757319ddc54fdc6609989cc7f4b143e4f758565d Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 10 Aug 2017 13:06:30 +0200 Subject: [PATCH] prefer index iterator for recovery --- testing/test_recover.py | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/testing/test_recover.py b/testing/test_recover.py index 1a2193e..a5b37c4 100644 --- a/testing/test_recover.py +++ b/testing/test_recover.py @@ -130,17 +130,19 @@ class RecoverTest (BaseTest): os.chdir (curdir) # but recover will succeed - dtar.restore_backup(target_path=dst_path, - backup_tar_path=backup_full) + dtar.recover_backup(target_path=dst_path, + backup_indexes_paths=[ + "%s/%s" % (bak_path, index_file) + ]) # with one file missing - missing = 0 + missing = [] for key, value in self.hash.items (): if os.path.exists (key): assert value == self.md5sum (key) else: - missing += 1 - assert missing == 1 + missing.append (key) + assert len (missing) == 1 shutil.rmtree (src_path) -- 1.7.1