()
| 38 | |
| 39 | |
| 40 | async def _create_tool_context() -> ToolContext: |
| 41 | session_service = InMemorySessionService() |
| 42 | session = await session_service.create_session( |
| 43 | app_name='test_app', user_id='test_user' |
| 44 | ) |
| 45 | agent = SequentialAgent(name='test_agent') |
| 46 | invocation_context = InvocationContext( |
| 47 | invocation_id='invocation_id', |
| 48 | agent=agent, |
| 49 | session=session, |
| 50 | session_service=session_service, |
| 51 | ) |
| 52 | return ToolContext(invocation_context) |
| 53 | |
| 54 | |
| 55 | @pytest.mark.asyncio |
no test coverage detected