(self, tmp_path)
| 59 | |
| 60 | @pytest.mark.asyncio |
| 61 | async def test_run_query_passes_question_to_agent(self, tmp_path): |
| 62 | (tmp_path / "wiki").mkdir() |
| 63 | (tmp_path / ".openkb").mkdir() |
| 64 | |
| 65 | captured = {} |
| 66 | |
| 67 | async def fake_run(agent, message, **kwargs): |
| 68 | captured["message"] = message |
| 69 | return MagicMock(final_output="answer") |
| 70 | |
| 71 | with patch("openkb.agent.query.Runner.run", side_effect=fake_run): |
| 72 | await run_query("How does attention work?", tmp_path, "gpt-4o-mini") |
| 73 | |
| 74 | assert "How does attention work?" in captured["message"] |
| 75 | |
| 76 | |
| 77 | def test_query_strategy_mentions_entities(): |
nothing calls this directly
no test coverage detected