#NEWLINE# def test_verify_id_token_reject_wrong_azp( self , monkeypatch ) : #NEWLINE# #INDENT# issuer = 'https://provider.example.com' #NEWLINE# monkeypatch . setattr ( self . client , 'provider_info' , { #NEWLINE# #INDENT# 'issuer' : issuer , #NEWLINE# #UNINDENT# } ) #NEWLINE# id_token = IdToken ( ** dict ( iss = issuer , aud = [ 'nobody' , 'somebody' , self . client . client_id ] , azp = 'nobody' ) ) #NEWLINE# with pytest . raises ( OtherError ) as exc : #NEWLINE# #INDENT# self . client . _verify_id_token ( id_token ) #NEWLINE# #UNINDENT# assert ( 'me' in str ( exc . value ) )