File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
tests/server/agent_execution Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -280,6 +280,8 @@ async def test_build_populate_false_with_reference_task_ids(self) -> None:
280280 async def test_build_with_custom_id_generators (self ) -> None :
281281 mock_task_id_generator = AsyncMock (spec = IDGenerator )
282282 mock_context_id_generator = AsyncMock (spec = IDGenerator )
283+ mock_task_id_generator .generate .return_value = 'custom_task_id'
284+ mock_context_id_generator .generate .return_value = 'custom_context_id'
283285
284286 builder = SimpleRequestContextBuilder (
285287 should_populate_referred_tasks = False ,
@@ -300,6 +302,8 @@ async def test_build_with_custom_id_generators(self) -> None:
300302
301303 mock_task_id_generator .generate .assert_called_once ()
302304 mock_context_id_generator .generate .assert_called_once ()
305+ self .assertEqual (request_context .task_id , 'custom_task_id' )
306+ self .assertEqual (request_context .context_id , 'custom_context_id' )
303307
304308 async def test_build_with_provided_ids_and_custom_id_generators (self ) -> None :
305309 mock_task_id_generator = AsyncMock (spec = IDGenerator )
You can’t perform that action at this time.
0 commit comments