#NEWLINE# def test_authenticated_token( self ) : #NEWLINE# #INDENT# _session_db = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# cons = Consumer ( _session_db , client_config = CLIENT_CONFIG , server_info = SERVER_INFO , ** CONSUMER_CONFIG ) #NEWLINE# ( sid , location ) = cons . begin ( 'http://localhost:8087' , 'http://localhost:8088/authorization' , 'token' ) #NEWLINE# QUERY_STRING = location . split ( '?' ) [ 1 ] #NEWLINE# resp = self . provider . authorization_endpoint ( QUERY_STRING ) #NEWLINE# auth_resp = parse_qs ( urlparse ( resp . message ) . fragment ) #NEWLINE# assert ( 'access_token' in auth_resp ) #NEWLINE# assert ( auth_resp [ 'token_type' ] [ 0 ] == 'Bearer' )