#NEWLINE# def test_decode_invalid_payload_string( self , jwt ) : #NEWLINE# #INDENT# example_jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.aGVsbG8gd29ybGQ.SIr03zM64awWRdPrAM_61QWsZchAtgDV3pphfHPPWkI' #NEWLINE# example_secret = 'secret' #NEWLINE# with pytest . raises ( DecodeError ) as exc : #NEWLINE# #INDENT# jwt . decode ( example_jwt , example_secret ) #NEWLINE# #UNINDENT# assert ( 'Invalid payload string' in str ( exc . value ) )