#NEWLINE# def test_query_delete( self ) : #NEWLINE# #INDENT# for i in range ( 5 ) : #NEWLINE# #INDENT# u = User . create ( username = ( 'u%s' % ( i + 1 ) ) ) #NEWLINE# #UNINDENT# User . query_delete ( ( ( User . username == 'u1' ) | ( User . username == 'u4' ) ) ) #NEWLINE# usernames = [ user . username for user in User . all ( ) ] #NEWLINE# self . assertEqual ( sorted ( usernames ) , [ 'u2' , 'u3' , 'u5' ] ) #NEWLINE# User . query_delete ( ) #NEWLINE# self . assertEqual ( [ user for user in User . all ( ) ] , [ ] )