def __setup_file_cache(self, conf): file_cache_dir = conf.get('file_cache_dir', None) self.file_cache = Cache(file_cache_dir) if file_cache_dir else None
def setUp(self): self.temp_dir = mkdtemp() self.temp_file = NamedTemporaryFile(delete=False) self.temp_file.write(b"Hello World!") self.temp_file.close() self.cache = Cache(self.temp_dir)