Example #1
0
 def test_list_old_snapshots_returns_all_but_current_directory(self):
     storage = self.make_dir()
     snapshots = [self.make_snapshot_dir(storage) for _ in range(3)]
     current_snapshot = self.make_snapshot_dir(storage)
     os.symlink(current_snapshot, os.path.join(storage, "current"))
     self.assertItemsEqual(snapshots, cleanup.list_old_snapshots(storage))
Example #2
0
 def test_list_old_snapshots_returns_all(self):
     storage = self.make_dir()
     snapshots = [self.make_snapshot_dir(storage) for _ in range(3)]
     self.assertItemsEqual(snapshots, cleanup.list_old_snapshots(storage))