Module Import alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias alias alias alias alias alias alias alias alias alias alias alias ImportFrom alias alias alias ClassDef bases NameLoad NameLoad body FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr CompareIn Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad NameLoad attr CompareIn Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr CompareIn Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr CompareIn Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr CompareIn Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr CompareIn NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareIn NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Str Str Str Assign NameStore Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Str Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Dict Assign SubscriptStore NameLoad Index Str ListLoad Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword Str keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr For NameStore Call NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BoolOpOr BoolOpAnd NameLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A collections gearman compat N/A unittest gearman.worker GearmanWorker gearman.worker_handler GearmanWorkerCommandHandler gearman.errors ServerUnavailable InvalidWorkerState gearman.protocol get_command_name GEARMAN_COMMAND_RESET_ABILITIES GEARMAN_COMMAND_CAN_DO GEARMAN_COMMAND_SET_CLIENT_ID GEARMAN_COMMAND_NOOP GEARMAN_COMMAND_PRE_SLEEP GEARMAN_COMMAND_NO_JOB GEARMAN_COMMAND_GRAB_JOB_UNIQ GEARMAN_COMMAND_JOB_ASSIGN_UNIQ GEARMAN_COMMAND_WORK_STATUS GEARMAN_COMMAND_WORK_FAIL GEARMAN_COMMAND_WORK_COMPLETE GEARMAN_COMMAND_WORK_DATA GEARMAN_COMMAND_WORK_EXCEPTION GEARMAN_COMMAND_WORK_WARNING tests._core_testing _GearmanAbstractTest MockGearmanConnectionManager MockGearmanConnection MockGearmanWorker N/A MockGearmanConnectionManager GearmanWorker N/A __init__ N/A N/A self N/A largs kwargs N/A N/A N/A N/A N/A super MockGearmanWorker self __init__ largs kwargs N/A N/A self worker_job_queues N/A N/A compat defaultdict N/A collections deque N/A on_job_execute N/A N/A self current_job N/A N/A N/A current_handler N/A N/A self connection_to_handler_map N/A N/A current_job connection N/A N/A N/A N/A N/A self worker_job_queues N/A current_handler append current_job N/A N/A _GearmanAbstractWorkerTest N/A _GearmanAbstractTest N/A N/A connection_manager_class MockGearmanWorker N/A command_handler_class GearmanWorkerCommandHandler setup_command_handler N/A N/A self N/A N/A N/A N/A N/A N/A super _GearmanAbstractWorkerTest self setup_command_handler N/A N/A N/A self assert_sent_abilities N/A N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_PRE_SLEEP N/A assert_sent_abilities N/A N/A self expected_abilities N/A N/A N/A observed_abilities N/A set N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_RESET_ABILITIES N/A ability expected_abilities N/A N/A N/A cmd_type cmd_args N/A N/A N/A N/A self connection _outgoing_commands popleft N/A N/A N/A self assertEqual N/A get_command_name cmd_type N/A get_command_name GEARMAN_COMMAND_CAN_DO N/A N/A N/A observed_abilities add N/A cmd_args N/A task N/A N/A N/A self assertEqual observed_abilities N/A set expected_abilities N/A assert_sent_client_id N/A N/A self expected_client_id N/A N/A N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_SET_CLIENT_ID client_id expected_client_id N/A N/A WorkerTest N/A _GearmanAbstractWorkerTest N/A N/A Test the public worker interface test_registering_functions N/A N/A self N/A N/A fake_callback_one N/A N/A worker_command_handler current_job N/A N/A N/A N/A fake_callback_two N/A N/A worker_command_handler current_job N/A N/A N/A N/A N/A N/A N/A N/A self connection_manager register_task fake_callback_one fake_callback_one N/A N/A N/A self failUnless N/A fake_callback_one N/A N/A self connection_manager worker_abilities N/A N/A N/A self failIf N/A fake_callback_two N/A N/A self connection_manager worker_abilities N/A N/A N/A self assertEqual N/A N/A N/A self connection_manager worker_abilities N/A fake_callback_one fake_callback_one N/A N/A N/A self assertEqual N/A N/A self command_handler _handler_abilities N/A fake_callback_one N/A N/A N/A N/A self connection_manager register_task fake_callback_two fake_callback_two N/A N/A N/A self failUnless N/A fake_callback_one N/A N/A self connection_manager worker_abilities N/A N/A N/A self failUnless N/A fake_callback_two N/A N/A self connection_manager worker_abilities N/A N/A N/A self assertEqual N/A N/A N/A self connection_manager worker_abilities N/A fake_callback_one fake_callback_one N/A N/A N/A self assertEqual N/A N/A N/A self connection_manager worker_abilities N/A fake_callback_two fake_callback_two N/A N/A N/A self assertEqual N/A N/A self command_handler _handler_abilities N/A fake_callback_one fake_callback_two N/A N/A N/A N/A self connection_manager unregister_task fake_callback_one N/A N/A N/A self failIf N/A fake_callback_one N/A N/A self connection_manager worker_abilities N/A N/A N/A self failUnless N/A fake_callback_two N/A N/A self connection_manager worker_abilities N/A N/A N/A self assertEqual N/A N/A N/A self connection_manager worker_abilities N/A fake_callback_two fake_callback_two N/A N/A N/A self assertEqual N/A N/A self command_handler _handler_abilities N/A fake_callback_two N/A test_setting_client_id N/A N/A self N/A N/A N/A new_client_id HELLO N/A N/A N/A self assertEqual N/A N/A self connection_manager worker_client_id None N/A N/A N/A self assertEqual N/A N/A self command_handler _client_id None N/A N/A N/A N/A self connection_manager set_client_id new_client_id N/A N/A N/A self assertEqual N/A N/A self connection_manager worker_client_id new_client_id N/A N/A N/A self assertEqual N/A N/A self command_handler _client_id new_client_id N/A test_establish_worker_connections N/A N/A self N/A N/A N/A N/A N/A self connection_manager connection_list N/A N/A N/A N/A self connection_manager command_handlers N/A N/A good_connection N/A MockGearmanConnection N/A N/A N/A good_connection connect N/A N/A good_connection _fail_on_bind False N/A failed_then_retried_connection N/A MockGearmanConnection N/A N/A failed_then_retried_connection _fail_on_bind False N/A failed_connection N/A MockGearmanConnection N/A N/A failed_connection _fail_on_bind True N/A N/A N/A self connection_manager connection_list N/A good_connection failed_then_retried_connection failed_connection N/A alive_connections N/A N/A N/A self connection_manager establish_worker_connections N/A N/A N/A self assertTrue N/A good_connection alive_connections N/A N/A N/A self assertTrue N/A failed_then_retried_connection alive_connections N/A N/A N/A self assertFalse N/A failed_connection alive_connections N/A test_establish_worker_connections_dead N/A N/A self N/A N/A N/A N/A N/A self connection_manager connection_list N/A N/A N/A N/A self connection_manager command_handlers N/A N/A N/A N/A self assertRaises ServerUnavailable N/A N/A self connection_manager work N/A dead_connection N/A MockGearmanConnection N/A N/A dead_connection _fail_on_bind True N/A N/A dead_connection connected False N/A N/A N/A self connection_manager connection_list N/A dead_connection N/A N/A N/A self assertRaises ServerUnavailable N/A N/A self connection_manager work N/A N/A WorkerCommandHandlerInterfaceTest N/A _GearmanAbstractWorkerTest N/A N/A Test the public interface a GearmanWorker may need to call in order to update state on a GearmanWorkerCommandHandler test_on_connect N/A N/A self N/A N/A N/A expected_abilities N/A function_one function_two function_three N/A expected_client_id my_client_id N/A N/A N/A self connection connected False N/A N/A N/A N/A self connection_manager set_client_id expected_client_id N/A N/A N/A N/A self connection_manager unregister_task __test_ability__ N/A task expected_abilities N/A N/A N/A N/A N/A self connection_manager register_task task None N/A N/A N/A N/A self connection_manager establish_connection N/A self connection N/A N/A N/A self assertNotEquals N/A self command_handler N/A N/A N/A self connection_manager connection_to_handler_map N/A N/A self connection N/A N/A N/A self assert_sent_client_id expected_client_id N/A N/A N/A self assert_sent_abilities expected_abilities N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_PRE_SLEEP N/A N/A N/A self assert_no_pending_commands N/A test_set_abilities N/A N/A self N/A N/A N/A expected_abilities N/A function_one function_two function_three N/A N/A N/A N/A self command_handler set_abilities expected_abilities N/A N/A N/A self assert_sent_abilities expected_abilities N/A N/A N/A self assert_no_pending_commands N/A test_set_client_id N/A N/A self N/A N/A N/A expected_client_id my_client_id N/A handler_initial_state N/A N/A N/A handler_initial_state N/A abilities N/A N/A N/A handler_initial_state N/A client_id None N/A N/A N/A N/A self command_handler set_client_id expected_client_id N/A N/A N/A self assert_sent_client_id expected_client_id N/A N/A N/A self assert_no_pending_commands N/A test_send_functions N/A N/A self N/A N/A N/A current_job N/A N/A self generate_job N/A N/A N/A N/A self command_handler send_job_status current_job 0 1 N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_WORK_STATUS job_handle N/A current_job handle numerator 0 denominator 1 N/A N/A N/A N/A self command_handler send_job_complete current_job completion data N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_WORK_COMPLETE job_handle N/A current_job handle data completion data N/A N/A N/A N/A self command_handler send_job_failure current_job N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_WORK_FAIL job_handle N/A current_job handle N/A N/A N/A N/A self command_handler send_job_exception current_job exception data N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_WORK_EXCEPTION job_handle N/A current_job handle data exception data N/A N/A N/A N/A self command_handler send_job_data current_job job data N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_WORK_DATA job_handle N/A current_job handle data job data N/A N/A N/A N/A self command_handler send_job_warning current_job job warning N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_WORK_WARNING job_handle N/A current_job handle data job warning N/A N/A WorkerCommandHandlerStateMachineTest N/A _GearmanAbstractWorkerTest N/A N/A Test multiple state transitions within a GearmanWorkerCommandHandler

    End to end tests without a server
     N/A connection_manager_class MockGearmanWorker N/A command_handler_class GearmanWorkerCommandHandler setup_connection_manager N/A N/A self N/A N/A N/A N/A N/A N/A super WorkerCommandHandlerStateMachineTest self setup_connection_manager N/A N/A N/A N/A self connection_manager register_task __test_ability__ None N/A setup_command_handler N/A N/A self N/A N/A N/A N/A N/A N/A super _GearmanAbstractWorkerTest self setup_command_handler N/A N/A N/A self assert_sent_abilities N/A __test_ability__ N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_PRE_SLEEP N/A test_wakeup_work N/A N/A self N/A N/A N/A N/A N/A self move_to_state_wakeup N/A N/A N/A self move_to_state_job_assign_uniq N/A N/A self generate_job_dict N/A N/A N/A self move_to_state_wakeup N/A N/A N/A self move_to_state_no_job N/A test_wakeup_sleep_wakup_work N/A N/A self N/A N/A N/A N/A N/A self move_to_state_wakeup N/A N/A N/A self move_to_state_no_job N/A N/A N/A self move_to_state_wakeup N/A N/A N/A self move_to_state_job_assign_uniq N/A N/A self generate_job_dict N/A N/A N/A self move_to_state_wakeup N/A N/A N/A self move_to_state_no_job N/A test_multiple_wakeup_then_no_work N/A N/A self N/A N/A N/A N/A N/A self move_to_state_wakeup N/A _ N/A range 5 N/A N/A N/A N/A N/A self command_handler recv_command GEARMAN_COMMAND_NOOP N/A N/A N/A self assert_job_lock is_locked True N/A N/A N/A self move_to_state_no_job N/A test_multiple_work N/A N/A self N/A N/A N/A N/A N/A self move_to_state_wakeup N/A N/A N/A self move_to_state_job_assign_uniq N/A N/A self generate_job_dict N/A N/A N/A self move_to_state_wakeup N/A N/A N/A self move_to_state_job_assign_uniq N/A N/A self generate_job_dict N/A N/A N/A self move_to_state_wakeup N/A N/A N/A self move_to_state_job_assign_uniq N/A N/A self generate_job_dict N/A N/A N/A self move_to_state_wakeup N/A N/A N/A self move_to_state_no_job N/A test_worker_already_locked N/A N/A self N/A N/A N/A other_connection N/A MockGearmanConnection N/A N/A N/A N/A N/A self connection_manager connection_list append other_connection N/A N/A N/A N/A self connection_manager establish_connection other_connection N/A other_handler N/A N/A N/A self connection_manager connection_to_handler_map N/A other_connection N/A N/A N/A other_handler recv_command GEARMAN_COMMAND_NOOP N/A N/A N/A self assertEqual N/A N/A self connection_manager command_handler_holding_job_lock other_handler N/A N/A N/A self assert_no_pending_commands N/A N/A N/A N/A self command_handler recv_command GEARMAN_COMMAND_NOOP N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_PRE_SLEEP N/A N/A N/A self assertEqual N/A N/A self connection_manager command_handler_holding_job_lock other_handler N/A N/A N/A other_handler recv_command GEARMAN_COMMAND_NO_JOB N/A N/A N/A self assert_job_lock is_locked False N/A N/A N/A self move_to_state_wakeup N/A N/A N/A self move_to_state_job_assign_uniq N/A N/A self generate_job_dict N/A N/A N/A self move_to_state_wakeup N/A N/A N/A self move_to_state_no_job N/A move_to_state_wakeup N/A N/A self N/A N/A N/A N/A N/A self assert_no_pending_commands N/A N/A N/A self assert_job_lock is_locked False N/A N/A N/A N/A self command_handler recv_command GEARMAN_COMMAND_NOOP N/A move_to_state_no_job N/A N/A self N/A N/A N/A Move us to the NO_JOB state...

        1) We should've most recently sent only a single GEARMAN_COMMAND_GRAB_JOB_UNIQ
        2) We should be awaiting job assignment
        3) Once we receive a NO_JOB, we should say we're going back to sleep N/A N/A N/A self assert_awaiting_job N/A N/A N/A N/A self command_handler recv_command GEARMAN_COMMAND_NO_JOB N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_PRE_SLEEP N/A N/A N/A self assert_no_pending_commands N/A N/A N/A self assert_job_lock is_locked False N/A move_to_state_job_assign_uniq N/A N/A self fake_job N/A N/A N/A Move us to the JOB_ASSIGN_UNIQ state...

        1) We should've most recently sent only a single GEARMAN_COMMAND_GRAB_JOB_UNIQ
        2) We should be awaiting job assignment
        3) The job we receive should be the one we expected N/A N/A N/A self assert_awaiting_job N/A N/A N/A N/A self command_handler recv_command GEARMAN_COMMAND_JOB_ASSIGN_UNIQ fake_job N/A current_job N/A N/A N/A N/A N/A self connection_manager worker_job_queues N/A N/A self command_handler popleft N/A N/A N/A self assertEqual N/A current_job handle N/A fake_job N/A job_handle N/A N/A N/A self assertEqual N/A current_job task N/A fake_job N/A task N/A N/A N/A self assertEqual N/A current_job unique N/A fake_job N/A unique N/A N/A N/A self assertEqual N/A current_job data N/A fake_job N/A data N/A N/A N/A self assert_job_lock is_locked False N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_PRE_SLEEP N/A assert_awaiting_job N/A N/A self N/A N/A N/A N/A N/A self assert_sent_command GEARMAN_COMMAND_GRAB_JOB_UNIQ N/A N/A N/A self assert_no_pending_commands N/A assert_job_lock N/A N/A self is_locked N/A N/A N/A expected_value N/A N/A is_locked N/A self command_handler None N/A N/A N/A self assertEqual N/A N/A self connection_manager command_handler_holding_job_lock expected_value N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main