#NEWLINE# def test_token_request( self ) : #NEWLINE# #INDENT# request_body = { #NEWLINE# #INDENT# 'code' : 'asdf' , #NEWLINE# 'client_id' : self . conn . user_id , #NEWLINE# 'client_secret' : self . conn . key , #NEWLINE# 'redirect_uri' : self . conn . redirect_uri , #NEWLINE# 'grant_type' : 'authorization_code' , #NEWLINE# #UNINDENT# } #NEWLINE# new_token = self . conn . _token_request ( request_body ) #NEWLINE# self . assertEqual ( new_token [ 'access_token' ] , STUB_IA_TOKEN [ 'access_token' ] ) #NEWLINE# exp = ( STUB_UTCNOW + datetime . timedelta ( seconds = STUB_IA_TOKEN [ 'expires_in' ] ) ) #NEWLINE# self . assertEqual ( new_token [ 'expire_time' ] , _utc_timestamp ( self ) )