#NEWLINE# def test_encode_dotdict( self ) : #NEWLINE# #INDENT# from interface.messages import process_dispatcher_schedule_process_in #NEWLINE# msg_obj = process_dispatcher_schedule_process_in ( ) #NEWLINE# msg_obj . name = 'process' #NEWLINE# msg_obj . configuration = { #NEWLINE# #INDENT# 'process' : { #NEWLINE# #INDENT# 'property' : 'FOO' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# invoke = Invocation ( ) #NEWLINE# invoke . message = msg_obj #NEWLINE# encode = EncodeInterceptor ( ) #NEWLINE# mangled = encode . outgoing ( invoke ) #NEWLINE# msg_encoded1 = mangled . message #NEWLINE# received = encode . incoming ( mangled ) #NEWLINE# msg_rec1 = received . message #NEWLINE# msg_obj = process_dispatcher_schedule_process_in ( ) #NEWLINE# msg_obj . name = 'process' #NEWLINE# msg_obj . configuration = DotDict ( ) #NEWLINE# msg_obj . configuration . process . property = 'FOO' #NEWLINE# invoke = Invocation ( ) #NEWLINE# invoke . message = msg_obj #NEWLINE# encode = EncodeInterceptor ( ) #NEWLINE# mangled = encode . outgoing ( invoke ) #NEWLINE# msg_encoded2 = mangled . message #NEWLINE# received = encode . incoming ( mangled ) #NEWLINE# msg_rec2 = self . message #NEWLINE# self . assertEquals ( msg_encoded1 , msg_encoded2 ) #NEWLINE# self . assertIsInstance ( msg_rec1 [ 'configuration' ] , dict ) #NEWLINE# self . assertIsInstance ( msg_rec2 [ 'configuration' ] , dict )