def it_can_construct_from_an_image_blob(self, blob_, BytesIO_, _from_stream_, stream_, image_): image = Image.from_blob(blob_) BytesIO_.assert_called_once_with(blob_) _from_stream_.assert_called_once_with(stream_, blob_) assert image is image_
def image(self): if self._image is None: self._image = Image.from_blob(self.blob) return self._image