#NEWLINE# def test_archive_callback_done_errors( self ) : #NEWLINE# #INDENT# self . dst . archive_job . update_target ( 'dropbox' , ARCHIVER_SUCCESS ) #NEWLINE# self . dst . archive_job . update_target ( 'osfstorage' , ARCHIVER_FAILURE ) #NEWLINE# self . dst . archive_job . save ( ) #NEWLINE# with mock . patch ( 'website.archiver.utils.handle_archive_fail' ) as mock_fail : #NEWLINE# #INDENT# listeners . archive_callback ( self . dst ) #NEWLINE# #UNINDENT# mock_fail . assert_called_with ( ARCHIVER_UNCAUGHT_ERROR , self . src , self . dst , self . user , self . dst . archive_job . target_addons )