#NEWLINE# @ mock . patch ( 'website.addons.box.views.BoxClient.get_folder' ) #NEWLINE# def test_box_list_folders_handles_max_retry_error( self , mock_metadata ) : #NEWLINE# #INDENT# mock_response = mock . Mock ( ) #NEWLINE# url = self . project . api_url_for ( 'box_folder_list' , folderId = 'fo' ) #NEWLINE# mock_metadata . side_effect = MaxRetryError ( mock_metadata , url ) #NEWLINE# res = self . app . get ( url , auth = self . user . auth , expect_errors = True ) #NEWLINE# assert_equal ( res . status_code , httplib . BAD_REQUEST )