#NEWLINE# @ mock . patch ( 'website.mails.send_mail' ) #NEWLINE# def test_handle_archive_fail( self , mock_send_mail ) : #NEWLINE# #INDENT# archiver_utils . handle_archive_fail ( ARCHIVER_NETWORK_ERROR , self . src , self . dst , self . user , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_equal ( mock_send_mail . call_count , 2 ) #NEWLINE# assert_true ( self . dst . is_deleted )