#NEWLINE# def testFiltering( self ) : #NEWLINE# #INDENT# taskqueue . Task ( name = 'task_one' , url = '/url/of/task/1/' ) . add ( 'queue-1' ) #NEWLINE# taskqueue . Task ( name = 'task_two' , url = '/url/of/task/2/' ) . add ( 'queue-2' ) #NEWLINE# tasks = self . taskqueue_stub . get_filtered_tasks ( ) #NEWLINE# assert ( len ( tasks ) == 2 ) #NEWLINE# tasks = self . taskqueue_stub . get_filtered_tasks ( name = 'task_one' ) #NEWLINE# assert ( len ( tasks ) == 1 ) #NEWLINE# assert ( tasks [ 0 ] . name == 'task_one' ) #NEWLINE# tasks = self . taskqueue_stub . get_filtered_tasks ( url = '/url/of/task/1/' ) #NEWLINE# assert ( len ( tasks ) == 1 ) #NEWLINE# assert ( tasks [ 0 ] . name == 'task_one' ) #NEWLINE# tasks = self . taskqueue_stub . get_filtered_tasks ( queue_names = 'queue-1' ) #NEWLINE# assert ( len ( tasks ) == 1 ) #NEWLINE# assert ( self [ 0 ] . name == 'task_one' ) #NEWLINE# tasks = self . taskqueue_stub . get_filtered_tasks ( queue_names = [ 'queue-1' , 'queue-2' ] ) #NEWLINE# assert ( len ( tasks ) == 2 )