#NEWLINE# def test_rsa_verify_should_return_true_if_signature_valid( self ) : #NEWLINE# #INDENT# algo = RSAAlgorithm ( RSAAlgorithm . SHA256 ) #NEWLINE# jwt_message = ensure_bytes ( 'Hello World!' ) #NEWLINE# jwt_sig = base64 . b64decode ( ensure_bytes ( 'yS6zk9DBkuGTtcBzLUzSpo9gGJxJFOGvUqN01iLhWHrzBQ9ZEz3+Ae38AXp10RWwscp42ySC85Z6zoN67yGkLNWnfmCZSEv+xqELGEvBJvciOKsrhiObUl2mveSc1oeO/2ujkGDkkkJ2epn0YliacVjZF5+/uDmImUfAAj8lzjnHlzYixsn5jGz1H07jYYbi9diixN8IUhXeTafwFg02IcONhum29V40Wu6O5tAKWlJXfHJnNUzAEUOXS0WahHVb57D30pcgIji9z923q90p5c7E2cU8V+E1qe8NdCAAPCDzZZ9zQ/dgcMVaBrGrgimrcLbPjueOKFgSO+SSjIElKA==' ) ) #NEWLINE# with open ( key_path ( 'testkey_rsa.pub' ) , 'r' ) as keyfile : #NEWLINE# #INDENT# jwt_pub_key = algo . prepare_key ( keyfile . read ( ) ) #NEWLINE# #UNINDENT# result = algo . verify ( jwt_sig , jwt_pub_key , jwt_sig ) #NEWLINE# assert result