#NEWLINE# def testFlushRelatedModel( self ) : #NEWLINE# #INDENT# session = ( yield self . data . makePositions ( self ) ) #NEWLINE# self . assertTrue ( ( self . data . num_pos > 0 ) ) #NEWLINE# ( yield session . query ( Instrument ) . delete ( ) ) #NEWLINE# ( yield self . async . assertEqual ( session . query ( Instrument ) . all ( ) , [ ] ) ) #NEWLINE# ( yield self . async . assertEqual ( session . query ( Position ) . all ( ) , [ ] ) ) #NEWLINE# keys = ( yield session . keys ( Instrument ) ) #NEWLINE# if ( self . backend == 'redis' ) : #NEWLINE# #INDENT# self . assertTrue ( ( len ( keys ) > 0 ) )