#NEWLINE# def testDelete( self ) : #NEWLINE# #INDENT# 'Test delete on models with related models' #NEWLINE# session = ( yield self . data . makePositions ( self ) ) #NEWLINE# instruments = session . query ( Instrument ) #NEWLINE# positions = session . query ( Position ) #NEWLINE# self . assertTrue ( instruments . count ( ) ) #NEWLINE# self . assertTrue ( positions . count ( ) ) #NEWLINE# instruments . delete ( ) #NEWLINE# self . assertFalse ( session . query ( Instrument ) . count ( ) ) #NEWLINE# self . assertFalse ( session . query ( Position ) . count ( ) )