#NEWLINE# def test_unsupported_grant_type( self ) : #NEWLINE# #INDENT# self . validator . authenticate_client . side_effect = self . set_client #NEWLINE# ( _ , body , _ ) = self . web . create_token_response ( 'https://i.b/token' , body = 'grant_type=bar&code=foo' ) #NEWLINE# self . assertEqual ( 'unsupported_grant_type' , json . loads ( body ) [ 'error' ] ) #NEWLINE# ( _ , body , _ ) = self . legacy . create_token_response ( 'https://i.b/token' , body = 'grant_type=bar&username=foo&password=bar' ) #NEWLINE# self . assertEqual ( 'unsupported_grant_type' , json . loads ( body ) [ 'error' ] ) #NEWLINE# ( _ , body , _ ) = self . backend . create_token_response ( 'https://i.b/token' , body = 'grant_type=bar' ) #NEWLINE# self . assertEqual ( 'unsupported_grant_type' , json . loads ( body ) [ 'error' ] )