#NEWLINE# def test_b_only( self ) : #NEWLINE# #INDENT# ( A , B , C ) = self . classes ( 'A' , 'B' , 'C' ) #NEWLINE# self . _fixture ( b_p = True ) #NEWLINE# s = Session ( ) #NEWLINE# ( a1 , b1 , c1 ) = ( A ( id = 1 ) , B ( id = 2 ) , C ( cid = 1 , id = 3 ) ) #NEWLINE# s . add_all ( [ a1 , b1 , c1 ] ) #NEWLINE# s . commit ( ) #NEWLINE# s . delete ( a1 ) #NEWLINE# with self . sql_execution_asserter ( testing . db ) as asserter : #NEWLINE# #INDENT# s . flush ( ) #NEWLINE# #UNINDENT# asserter . assert_ ( CompiledSQL ( 'SELECT a.id AS a_id, a.type AS a_type FROM a WHERE a.id = :param_1' , [ { #NEWLINE# #INDENT# 'param_1' : 1 , #NEWLINE# #UNINDENT# } ] ) , CompiledSQL ( 'DELETE FROM a WHERE a.id = :id' , [ { #NEWLINE# #INDENT# 'id' : 1 , #NEWLINE# #UNINDENT# } ] ) ) #NEWLINE# b1 . id #NEWLINE# s . delete ( b1 ) #NEWLINE# with self . sql_execution_asserter ( testing . db ) as asserter : #NEWLINE# #INDENT# s . flush ( ) #NEWLINE# #UNINDENT# asserter . assert_ ( CompiledSQL ( 'DELETE FROM a WHERE a.id = :id' , [ { #NEWLINE# #INDENT# 'id' : 2 , #NEWLINE# #UNINDENT# } ] ) ) #NEWLINE# c1 . id #NEWLINE# s . delete ( c1 ) #NEWLINE# with self . sql_execution_asserter ( testing . db ) as asserter : #NEWLINE# #INDENT# s . flush ( ) #NEWLINE# #UNINDENT# asserter . assert_ ( CompiledSQL ( 'DELETE FROM a WHERE a.id = :id' , [ { #NEWLINE# #INDENT# 'id' : 3 , #NEWLINE# #UNINDENT# } ] ) )