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

Method _setup_kb

tests/test_add_command.py:45–56  ·  view source on GitHub ↗

Create a minimal KB structure.

(self, tmp_path)

Source from the content-addressed store, hash-verified

43
44class TestAddCommand:
45 def _setup_kb(self, tmp_path):
46 """Create a minimal KB structure."""
47 (tmp_path / "raw").mkdir()
48 (tmp_path / "wiki" / "sources" / "images").mkdir(parents=True)
49 (tmp_path / "wiki" / "summaries").mkdir(parents=True)
50 (tmp_path / "wiki" / "concepts").mkdir(parents=True)
51 (tmp_path / "wiki" / "reports").mkdir(parents=True)
52 openkb_dir = tmp_path / ".openkb"
53 openkb_dir.mkdir()
54 (openkb_dir / "config.yaml").write_text("model: gpt-4o-mini\n")
55 (openkb_dir / "hashes.json").write_text(json.dumps({}))
56 return tmp_path
57
58 def test_add_missing_init(self, tmp_path):
59 runner = CliRunner()

Calls

no outgoing calls

Tested by

no test coverage detected