#NEWLINE# def test_api_pkg_versions_authed( self ) : #NEWLINE# #INDENT# ' /api/package/<pkg>/<filename> requires write perms ' #NEWLINE# package = make_package ( self . package . name , '1.5' ) #NEWLINE# params = { #NEWLINE# #INDENT# 'content' : webtest . forms . Upload ( package . filename , 'datadatadata' ) , #NEWLINE# #UNINDENT# } #NEWLINE# url = ( '/api/package/%s/%s' % ( package . name , package . filename ) ) #NEWLINE# response = self . app . post ( url , params , headers = _auth ( 'user2' , 'user2' ) ) #NEWLINE# self . assertEqual ( response . status_int , 200 )