#NEWLINE# def test_should_collect_multiple_tasks( self ) : #NEWLINE# #INDENT# def task( ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# setattr ( task , TASK_ATTRIBUTE , True ) #NEWLINE# def task2( ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# setattr ( task2 , TASK_ATTRIBUTE , True ) #NEWLINE# module = ModuleType ( 'mock_module' ) #NEWLINE# module . task = task #NEWLINE# module . task2 = task2 #NEWLINE# self . reactor . collect_tasks_and_actions_and_initializers ( module ) #NEWLINE# self . assertEquals ( len ( self . execution_manager . register_task . call_args_list ) , 2 ) #NEWLINE# for call_args in self . execution_manager . register_task . call_args_list : #NEWLINE# #INDENT# self . assertTrue ( ( isinstance ( call_args [ 0 ] [ 0 ] , Task ) and ( len ( call_args [ 0 ] ) == 1 ) ) )