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

Method _fake_client

tests/test_indexer.py:301–312  ·  view source on GitHub ↗
(self, doc_id, sample_tree, pages)

Source from the content-addressed store, hash-verified

299
300class TestImportCloudDocument:
301 def _fake_client(self, doc_id, sample_tree, pages):
302 col = MagicMock()
303 col.get_document.return_value = {
304 "doc_id": doc_id,
305 "doc_name": "Cloud Paper.pdf",
306 "doc_description": sample_tree["doc_description"],
307 "structure": sample_tree["structure"],
308 }
309 col.get_page_content.return_value = pages
310 client = MagicMock()
311 client.collection.return_value = col
312 return client, col
313
314 def test_writes_artifacts_and_returns_result(self, kb_dir, sample_tree, monkeypatch):
315 from openkb.indexer import CloudImportResult, import_cloud_document

Calls

no outgoing calls

Tested by

no test coverage detected