(chat_context)
| 138 | # --------------------------------------------------------------------------- |
| 139 | @pytest.mark.asyncio |
| 140 | async def test_initialize_chat_context(chat_context): |
| 141 | ok = await chat_context.initialize() |
| 142 | assert ok is True |
| 143 | |
| 144 | # tools discovered |
| 145 | assert chat_context.get_tool_count() == 2 |
| 146 | |
| 147 | # system prompt injected as first conversation turn |
| 148 | assert chat_context.conversation_history[0].to_dict() == { |
| 149 | "role": "system", |
| 150 | "content": "SYS_PROMPT", |
| 151 | } |
| 152 | |
| 153 | # OpenAI tools adapted |
| 154 | assert len(chat_context.openai_tools) == 2 |
| 155 | assert chat_context.tool_name_mapping # non-empty |
| 156 | |
| 157 | |
| 158 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected