#NEWLINE# def test_fetching_access_token_with_invalid_client( self ) : #NEWLINE# #INDENT# self . login ( ) #NEWLINE# self . _login_and_authorize ( ) #NEWLINE# response = self . client . post ( self . access_token_url ( ) , { #NEWLINE# #INDENT# 'grant_type' : 'authorization_code' , #NEWLINE# 'client_id' : ( self . get_client ( ) . client_id + '123' ) , #NEWLINE# 'client_secret' : self . get_client ( ) . client_secret , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( 400 , response . status_code , self . content ) #NEWLINE# self . assertEqual ( 'invalid_client' , json . loads ( response . content ) [ 'error' ] )