@@ -36,7 +36,7 @@ async def mock_stream(user_input):
36
36
# Mock the task creation
37
37
mock_task = MagicMock ()
38
38
mock_task .id = "test-task-id"
39
- mock_task .contextId = "test-context-id"
39
+ mock_task .context_id = "test-context-id"
40
40
mock_request_context .current_task = mock_task
41
41
42
42
await executor .execute (mock_request_context , mock_event_queue )
@@ -65,7 +65,7 @@ async def mock_stream(user_input):
65
65
# Mock the task creation
66
66
mock_task = MagicMock ()
67
67
mock_task .id = "test-task-id"
68
- mock_task .contextId = "test-context-id"
68
+ mock_task .context_id = "test-context-id"
69
69
mock_request_context .current_task = mock_task
70
70
71
71
await executor .execute (mock_request_context , mock_event_queue )
@@ -95,7 +95,7 @@ async def mock_stream(user_input):
95
95
# Mock the task creation
96
96
mock_task = MagicMock ()
97
97
mock_task .id = "test-task-id"
98
- mock_task .contextId = "test-context-id"
98
+ mock_task .context_id = "test-context-id"
99
99
mock_request_context .current_task = mock_task
100
100
101
101
await executor .execute (mock_request_context , mock_event_queue )
@@ -125,7 +125,7 @@ async def mock_stream(user_input):
125
125
# Mock the task creation
126
126
mock_task = MagicMock ()
127
127
mock_task .id = "test-task-id"
128
- mock_task .contextId = "test-context-id"
128
+ mock_task .context_id = "test-context-id"
129
129
mock_request_context .current_task = mock_task
130
130
131
131
await executor .execute (mock_request_context , mock_event_queue )
@@ -156,7 +156,7 @@ async def mock_stream(user_input):
156
156
mock_request_context .current_task = None
157
157
158
158
with patch ("strands.multiagent.a2a.executor.new_task" ) as mock_new_task :
159
- mock_new_task .return_value = MagicMock (id = "new-task-id" , contextId = "new-context-id" )
159
+ mock_new_task .return_value = MagicMock (id = "new-task-id" , context_id = "new-context-id" )
160
160
161
161
await executor .execute (mock_request_context , mock_event_queue )
162
162
@@ -180,7 +180,7 @@ async def test_execute_streaming_mode_handles_agent_exception(
180
180
# Mock the task creation
181
181
mock_task = MagicMock ()
182
182
mock_task .id = "test-task-id"
183
- mock_task .contextId = "test-context-id"
183
+ mock_task .context_id = "test-context-id"
184
184
mock_request_context .current_task = mock_task
185
185
186
186
with pytest .raises (ServerError ):
@@ -210,7 +210,7 @@ async def test_handle_agent_result_with_none_result(mock_strands_agent, mock_req
210
210
# Mock the task creation
211
211
mock_task = MagicMock ()
212
212
mock_task .id = "test-task-id"
213
- mock_task .contextId = "test-context-id"
213
+ mock_task .context_id = "test-context-id"
214
214
mock_request_context .current_task = mock_task
215
215
216
216
# Mock TaskUpdater
@@ -235,7 +235,7 @@ async def test_handle_agent_result_with_result_but_no_message(
235
235
# Mock the task creation
236
236
mock_task = MagicMock ()
237
237
mock_task .id = "test-task-id"
238
- mock_task .contextId = "test-context-id"
238
+ mock_task .context_id = "test-context-id"
239
239
mock_request_context .current_task = mock_task
240
240
241
241
# Mock TaskUpdater
0 commit comments