#NEWLINE# def test_instance_dict( self ) : #NEWLINE# #INDENT# class User ( MyClass ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# register_class ( User ) #NEWLINE# attributes . register_attribute ( User , 'user_id' , uselist = False , useobject = False ) #NEWLINE# attributes . register_attribute ( User , 'user_name' , uselist = False , useobject = False ) #NEWLINE# attributes . register_attribute ( User , 'email_address' , uselist = False , useobject = False ) #NEWLINE# u = User ( ) #NEWLINE# u . user_id = 7 #NEWLINE# u . user_name = 'john' #NEWLINE# u . email_address = 'lala@123.com' #NEWLINE# eq_ ( u . __dict__ , { #NEWLINE# #INDENT# '_my_state' : u . _my_state , #NEWLINE# '_goofy_dict' : { #NEWLINE# #INDENT# 'user_id' : 7 , #NEWLINE# 'user_name' : 'john' , #NEWLINE# 'email_address' : 'lala@123.com' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } )