def _setup_chunk_indexes(self): self._chunklist = obnamlib.ChunkList( self._fs, self._node_size, self._upload_queue_size, self._lru_size, self) self._chunksums = obnamlib.ChecksumTree( self._fs, 'chunksums', len(self._checksum('')), self._node_size, self._upload_queue_size, self._lru_size, self)
def setUp(self): self.tempdir = tempfile.mkdtemp() fs = obnamlib.LocalFS(self.tempdir) self.hooks = obnamlib.HookManager() self.hooks.new('repository-toplevel-init') self.checksum = hashlib.md5('foo').digest() self.tree = obnamlib.ChecksumTree(fs, 'x', len(self.checksum), obnamlib.DEFAULT_NODE_SIZE, obnamlib.DEFAULT_UPLOAD_QUEUE_SIZE, obnamlib.DEFAULT_LRU_SIZE, self)