#NEWLINE# def runTest( self ) : #NEWLINE# #INDENT# me = 'http://127.0.0.1:9999' #NEWLINE# redirect_uri = 'http://localhost:9999/success' #NEWLINE# client_id = 'tester' #NEWLINE# r = ninka . indieauth . discoverAuthEndpoints ( r ) #NEWLINE# assert ( 'authorization_endpoint' in r ) #NEWLINE# authURL = None #NEWLINE# for url in r [ 'authorization_endpoint' ] : #NEWLINE# #INDENT# authURL = url #NEWLINE# break #NEWLINE# #UNINDENT# assert ( authURL is not None ) #NEWLINE# assert ( authURL . scheme == 'https' ) #NEWLINE# assert ( authURL . netloc == 'indieauth.com' ) #NEWLINE# assert ( authURL . path == '/auth' ) #NEWLINE# url = ParseResult ( authURL . scheme , authURL . netloc , authURL . path , authURL . params , urllib . urlencode ( { #NEWLINE# #INDENT# 'me' : me , #NEWLINE# 'redirect_uri' : redirect_uri , #NEWLINE# 'client_id' : client_id , #NEWLINE# 'scope' : 'post' , #NEWLINE# 'response_type' : 'id' , #NEWLINE# #UNINDENT# } ) , authURL . fragment ) . geturl ( ) #NEWLINE# r = requests . get ( url , verify = True ) #NEWLINE# assert ( r . status_code == 200 )