#NEWLINE# def test_marshal_nested( self ) : #NEWLINE# #INDENT# model = OrderedDict ( [ ( 'foo' , fields . Raw ) , ( 'fee' , fields . Nested ( { #NEWLINE# #INDENT# 'fye' : fields . String , #NEWLINE# #UNINDENT# } ) ) ] ) #NEWLINE# marshal_fields = OrderedDict ( [ ( 'foo' , 'bar' ) , ( 'bat' , 'baz' ) , ( 'fee' , { #NEWLINE# #INDENT# 'fye' : 'fum' , #NEWLINE# #UNINDENT# } ) ] ) #NEWLINE# output = marshal ( marshal_fields , model ) #NEWLINE# expected = OrderedDict ( [ ( 'foo' , 'bar' ) , ( 'fee' , OrderedDict ( [ ( 'fye' , 'fum' ) ] ) ) ] ) #NEWLINE# self . assertEquals ( output , expected )