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

Method test_empty_pages_raise

tests/test_indexer.py:344–356  ·  view source on GitHub ↗
(self, kb_dir, sample_tree, monkeypatch)

Source from the content-addressed store, hash-verified

342 raise AssertionError("expected RuntimeError when API key is missing")
343
344 def test_empty_pages_raise(self, kb_dir, sample_tree, monkeypatch):
345 from openkb.indexer import import_cloud_document
346
347 monkeypatch.setenv("PAGEINDEX_API_KEY", "test-key")
348 client, col = self._fake_client("cloud-2", sample_tree, [])
349
350 with patch("openkb.indexer.PageIndexClient", return_value=client):
351 try:
352 import_cloud_document("cloud-2", kb_dir, "pageindex-cloud:cloud-2")
353 except RuntimeError as exc:
354 assert "No page content" in str(exc)
355 else:
356 raise AssertionError("expected RuntimeError on empty pages")
357
358
359def test_write_long_doc_artifacts_writes_json_and_summary(kb_dir, sample_tree):

Callers

nothing calls this directly

Calls 2

_fake_clientMethod · 0.95
import_cloud_documentFunction · 0.90

Tested by

no test coverage detected