#NEWLINE# @ use_fake_addons #NEWLINE# @ mock . patch ( 'website.archiver.tasks.make_copy_request.delay' ) #NEWLINE# def test_archive_addon( self , mock_make_copy_request ) : #NEWLINE# #INDENT# result = archiver_utils . aggregate_file_tree_metadata ( 'dropbox' , FILE_TREE , self . user ) #NEWLINE# archive_addon ( 'dropbox' , self . archive_job . _id , result ) #NEWLINE# assert_equal ( self . archive_job . get_target ( 'dropbox' ) . status , ARCHIVER_INITIATED ) #NEWLINE# cookie = self . user . get_or_create_cookie ( ) #NEWLINE# assert mock_make_copy_request . called_with ( self . archive_job . _id , ( settings . WATERBUTLER_URL + '/ops/copy' ) , data = dict ( source = dict ( cookie = self , nid = self . src . _id , provider = 'dropbox' , path = '/' ) , destination = dict ( cookie = cookie , nid = self . dst . _id , provider = settings . ARCHIVE_PROVIDER , path = '/' ) , rename = 'Archive of DropBox' ) )