def topic(self): config = Config( FILE_STORAGE_ROOT_PATH="/tmp/thumbor/file_storage/") storage = FileStorage( Context(config=config, server=get_server('ACME-SEC'))) storage.put(IMAGE_URL % 7, IMAGE_BYTES) storage.put_detector_data(IMAGE_URL % 7, 'some-data') return storage.get_detector_data(IMAGE_URL % 7)
def test_detector_can_store_detector_data(self): iurl = self.get_image_url('image_7.jpg') ibytes = self.get_image_bytes('image.jpg') storage = FileStorage(self.context) storage.put(iurl, ibytes) storage.put_detector_data(iurl, 'some-data') got = yield storage.get_detector_data(iurl) expect(got).not_to_be_null() expect(got).not_to_be_an_error() expect(got).to_equal('some-data')
def topic(self): config = Config(FILE_STORAGE_ROOT_PATH="/tmp/thumbor/file_storage/") storage = FileStorage(Context(config=config, server=get_server('ACME-SEC'))) storage.put(IMAGE_URL % 7, IMAGE_BYTES) storage.put_detector_data(IMAGE_URL % 7, 'some-data') return storage.get_detector_data(IMAGE_URL % 7)