#NEWLINE# def test_api_download_file_version_redirect( self ) : #NEWLINE# #INDENT# url = '/api/v1/project/{0}/osffiles/{1}/version/3/' . format ( self . project . _id , self . path ) #NEWLINE# res = self . app . get ( url , auth = self . user . auth ) #NEWLINE# assert_equal ( res . status_code , 301 ) #NEWLINE# expected_url = self . project . web_url_for ( 'addon_view_or_download_file' , version = 3 , path = self . expected_path , action = 'download' , provider = 'osfstorage' ) #NEWLINE# assert_urls_equal ( res . location , expected_url )