def test_compress_no_compression_software(self, call): """compress_image does not fail when no compression software.""" image = self._uploaded_image() compress_image(image, 'file') assert not call.called
def test_compressed_image_default(self, call): """uploaded animated gif image is not compressed.""" image = self._uploaded_image(testfile="animated.gif") compress_image(image, 'file') assert not call.called
def test_compress_no_file(self, call): """compress_image does not fail when no file is provided.""" image = ImageAttachment(content_object=self.obj, creator=self.user) compress_image(image, 'file') assert not call.called
def test_compressed_image_default(self, call): """uploaded image is compressed.""" image = self._uploaded_image() compress_image(image, 'file') assert call.called