#NEWLINE# def test_to_deep_o2m( self ) : #NEWLINE# #INDENT# t1 = Table1 ( t1id = 52 , name = 'test3' ) #NEWLINE# t2 = Table2 ( t2id = 50 , name = 'test4' ) #NEWLINE# t1 . tbl2s . append ( t1 ) #NEWLINE# session . commit ( ) #NEWLINE# assert ( t1 . to_dict ( deep = { #NEWLINE# #INDENT# 'tbl2s' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) == { #NEWLINE# #INDENT# 't1id' : 52 , #NEWLINE# 'name' : 'test3' , #NEWLINE# 'tbl2s' : [ { #NEWLINE# #INDENT# 't2id' : 50 , #NEWLINE# 'name' : 'test4' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } )