#NEWLINE# def test_payload_transform_complex_type( self ) : #NEWLINE# #INDENT# transformer = datatransform . get_transformer ( PAYLOAD ) #NEWLINE# mapping = { #NEWLINE# #INDENT# 'complex_dict' : { #NEWLINE# #INDENT# 'bool' : True , #NEWLINE# 'int' : 666 , #NEWLINE# 'str' : '{{trigger.k1}}-string' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# result = transformer ( mapping ) #NEWLINE# expected = { #NEWLINE# #INDENT# 'complex_dict' : { #NEWLINE# #INDENT# 'bool' : True , #NEWLINE# 'int' : 666 , #NEWLINE# 'str' : 'v1-string' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( result , expected ) #NEWLINE# mapping = { #NEWLINE# #INDENT# 'simple_list' : [ 1 , 2 , 3 ] , #NEWLINE# #UNINDENT# } #NEWLINE# result = transformer ( mapping ) #NEWLINE# self . assertEqual ( result , expected )