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

Method fake_index

tests/test_add_command.py:126–130  ·  view source on GitHub ↗
(raw_path, kb_dir_arg, doc_name=None)

Source from the content-addressed store, hash-verified

124 new_id = "11111111-1111-1111-1111-111111111111"
125
126 def fake_index(raw_path, kb_dir_arg, doc_name=None):
127 (files / f"{new_id}.pdf").write_bytes(b"new-blob")
128 (files / new_id / "images").mkdir(parents=True)
129 (files / new_id / "images" / "p1.png").write_bytes(b"img")
130 return IndexResult(doc_id=new_id, description="", tree={"structure": []})
131
132 doc = tmp_path / "paper.pdf"
133 doc.write_bytes(b"%PDF-1.4 fake")

Callers

nothing calls this directly

Calls 1

IndexResultClass · 0.90

Tested by

no test coverage detected