#NEWLINE# def test_generate( self ) : #NEWLINE# #INDENT# test_data = { #NEWLINE# #INDENT# 'key' : 'value' , #NEWLINE# #UNINDENT# } #NEWLINE# self . json_manager . set_reserved_attribute ( test_data , 'iss' , 'test' ) #NEWLINE# header = self . json_manager . _generate_header ( ) #NEWLINE# payload = self . json_manager . _generate_payload ( test_data ) #NEWLINE# signature = self . json_manager . _generate_signature ( header , payload ) #NEWLINE# token = '{0}.{1}.{2}' . format ( header , payload , signature ) #NEWLINE# test_token_data = { #NEWLINE# #INDENT# 'key' : 'value' , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( self . json_manager . generate ( self , iss = 'test' ) , token )