#NEWLINE# @ mock . patch ( 'thumbor.engines.cairosvg' , new = None ) #NEWLINE# @ mock . patch ( 'thumbor.engines.logger.error' ) #NEWLINE# def test_not_imported_cairosvg_failed_to_convert_svg_to_png( self , mockLogError ) : #NEWLINE# #INDENT# buffer = '<svg width="10px" height="20px" viewBox="0 0 10 20"\n                    xmlns="http://www.w3.org/2000/svg">\n                        <rect width="100%" height="10" x="0" y="0"/>\n                    </svg>' #NEWLINE# returned_buffer = self . engine . convert_svg_to_png ( buffer ) #NEWLINE# expect ( mockLogError . called ) . to_be_true ( ) #NEWLINE# expect ( buffer ) . to_equal ( returned_buffer )