#NEWLINE# def test_ordering( self ) : #NEWLINE# #INDENT# ( B , C ) = ( self . classes . B , C . classes . C ) #NEWLINE# sess = Session ( ) #NEWLINE# sess . add_all ( [ B ( ) , C ( ) , B ( ) , C ( ) ] ) #NEWLINE# self . assert_sql_execution ( testing . db , sess . flush , CompiledSQL ( 'INSERT INTO a () VALUES ()' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) , CompiledSQL ( 'INSERT INTO a () VALUES ()' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) , CompiledSQL ( 'INSERT INTO a () VALUES ()' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) , CompiledSQL ( 'INSERT INTO a () VALUES ()' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) , AllOf ( CompiledSQL ( 'INSERT INTO b (id) VALUES (:id)' , [ { #NEWLINE# #INDENT# 'id' : 1 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'id' : 3 , #NEWLINE# #UNINDENT# } ] ) , CompiledSQL ( 'INSERT INTO c (id) VALUES (:id)' , [ { #NEWLINE# #INDENT# 'id' : 2 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'id' : 4 , #NEWLINE# #UNINDENT# } ] ) ) )