#NEWLINE# @ mock . patch . object ( settings . _wrapped , 'OPTIPNG_PATH' , '' ) #NEWLINE# @ mock . patch . object ( kitsune . upload . tasks . subprocess , 'call' ) #NEWLINE# def test_compress_no_file( self , call ) : #NEWLINE# #INDENT# 'compress_image does not fail when no file is provided.' #NEWLINE# image = ImageAttachment ( content_object = self . obj , creator = self . user ) #NEWLINE# compress_image ( image , 'file' ) #NEWLINE# assert ( not call . called )