async def test_12_link(self):
     keys = list(self.files.keys())
     random.shuffle(keys)
     for filename in keys[:self.FILE_COUNT // 4]:
         linkname = PurePosixPath(random.choice(LIPSUM_PATH),
                                  Generate.filename())
         await self.archive.link(linkname, filename)
         self.links[linkname] = self.files[filename]
 async def test_03_rename(self):
     keys = list(self.files.keys())
     random.shuffle(keys)
     for filename in keys[:self.FILE_COUNT // 4]:
         name = Generate.filename()
         await self.archive.rename(filename, name)
         self.files[PurePosixPath(filename.parent,
                                  name)] = self.files[filename]
         del self.files[filename]
 def setUpClass(cls) -> None:
     """Prepare class-wise environment"""
     random.seed(0)
     cls.dir = TemporaryDirectory()
     cls.secret = os.urandom(32)
     cls.filename = Path(cls.dir.name, "test.ar7")
     if cls.filename.exists():
         raise OSError("File shouldn't be there.")
     cls.owner = Generate.uuid()
     cls.archive = Archive7.setup(cls.filename, cls.secret, owner=cls.owner)
     cls.files = dict()
     cls.links = dict()
     for _ in range(cls.FILE_COUNT):
         filename = PurePosixPath(random.choice(LIPSUM_PATH),
                                  Generate.filename())
         cls.files[filename] = Generate.lipsum()
     cls.archive.close()