#NEWLINE# @ use_fake_addons #NEWLINE# @ mock . patch ( 'website.archiver.tasks.archive_addon.delay' ) #NEWLINE# def test_archive_node_no_archive_size_limit( self , mock_archive_addon ) : #NEWLINE# #INDENT# settings . MAX_ARCHIVE_SIZE = 100 #NEWLINE# self . archive_job . initiator . system_tags . append ( NO_ARCHIVE_LIMIT ) #NEWLINE# self . archive_job . initiator . save ( ) #NEWLINE# with mock . patch . object ( StorageAddonBase , '_get_file_tree' ) as mock_file_tree : #NEWLINE# #INDENT# mock_file_tree . return_value = FILE_TREE #NEWLINE# results = [ stat_addon ( self , self . archive_job . _id ) for addon in [ 'osfstorage' , 'dropbox' ] ] #NEWLINE# #UNINDENT# with mock . patch . object ( celery , 'group' ) as mock_group : #NEWLINE# #INDENT# archive_node ( results , self . archive_job . _id ) #NEWLINE# #UNINDENT# archive_dropbox_signature = archive_addon . si ( 'dropbox' , self . archive_job . _id , results ) #NEWLINE# assert mock_group . called_with ( archive_dropbox_signature )