#NEWLINE# def test_workflow_execution_start_activity_task( ) : #NEWLINE# #INDENT# wfe = make_workflow_execution ( ) #NEWLINE# wfe . schedule_activity_task ( 123 , VALID_ACTIVITY_TASK_ATTRIBUTES ) #NEWLINE# task_token = wfe . activity_tasks [ ( - 1 ) ] . task_token #NEWLINE# wfe . start_activity_task ( task , identity = 'worker01' ) #NEWLINE# task = wfe . activity_tasks [ ( - 1 ) ] #NEWLINE# task . state . should . equal ( 'STARTED' ) #NEWLINE# wfe . events ( ) [ ( - 1 ) ] . event_type . should . equal ( 'ActivityTaskStarted' ) #NEWLINE# wfe . events ( ) [ ( - 1 ) ] . event_attributes [ 'identity' ] . should . equal ( 'worker01' )