MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / test_run_query_passes_question_to_agent

Method test_run_query_passes_question_to_agent

tests/test_query.py:61–74  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

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
77def test_query_strategy_mentions_entities():

Callers

nothing calls this directly

Calls 1

run_queryFunction · 0.90

Tested by

no test coverage detected