def topic(self): config = Config( FILE_STORAGE_ROOT_PATH="/tmp/thumbor/file_storage/%s" % random.randint(1, 10000000)) storage = FileStorage( Context(config=config, server=get_server('ACME-SEC'))) storage.ensure_dir(config.FILE_STORAGE_ROOT_PATH) return exists(config.FILE_STORAGE_ROOT_PATH)
def test_creates_root_path_if_none_found(self): storage = FileStorage(self.context) storage.ensure_dir(self.config.FILE_STORAGE_ROOT_PATH) expect(exists(self.config.FILE_STORAGE_ROOT_PATH)).to_be_true()
async def test_creates_root_path_if_none_found(self): storage = FileStorage(self.context) storage.ensure_dir(self.config.FILE_STORAGE_ROOT_PATH) expect(exists(self.config.FILE_STORAGE_ROOT_PATH)).to_be_true()
def topic(self): config = Config(FILE_STORAGE_ROOT_PATH="/tmp/thumbor/file_storage/%s" % random.randint(1, 10000000)) storage = FileStorage(Context(config=config, server=get_server('ACME-SEC'))) storage.ensure_dir(config.FILE_STORAGE_ROOT_PATH) return exists(config.FILE_STORAGE_ROOT_PATH)