Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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()
Ejemplo n.º 3
0
 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()
Ejemplo n.º 4
0
 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)