#NEWLINE# def test_create_token_within_original_scope( self ) : #NEWLINE# #INDENT# self . mock_validator . get_original_scopes . return_value = [ 'baz' ] #NEWLINE# self . mock_validator . is_within_original_scope . return_value = True #NEWLINE# bearer = BearerToken ( self . mock_validator ) #NEWLINE# ( headers , body , status_code ) = self . auth . create_token_response ( self . request , bearer ) #NEWLINE# token = json . loads ( body ) #NEWLINE# self . assertIn ( 'access_token' , token ) #NEWLINE# self . assertIn ( 'token_type' , token ) #NEWLINE# self . assertIn ( 'expires_in' , token ) #NEWLINE# self . assertEqual ( token [ 'scope' ] , 'foo' )