#NEWLINE# def testFilterIds( self ) : #NEWLINE# #INDENT# 'Simple filtering on ids.' #NEWLINE# session = self . session ( ) #NEWLINE# all = ( yield session . query ( self . model ) . load_only ( 'id' ) . all ( ) ) #NEWLINE# ids = set ( ( all [ 1 ] . id , all [ 5 ] . id , all [ 10 ] . id ) ) #NEWLINE# query = session . query ( self . model ) #NEWLINE# qs = ( yield query . filter ( id = ids ) . all ( ) ) #NEWLINE# self . assertEqual ( len ( qs ) , 3 ) #NEWLINE# cids = set ( ( o . id for o in qs ) ) #NEWLINE# self . assertEqual ( cids , ids )