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

Method test_requires_api_key

tests/test_indexer.py:333–342  ·  view source on GitHub ↗
(self, kb_dir, monkeypatch)

Source from the content-addressed store, hash-verified

331 col.add.assert_not_called()
332
333 def test_requires_api_key(self, kb_dir, monkeypatch):
334 from openkb.indexer import import_cloud_document
335
336 monkeypatch.delenv("PAGEINDEX_API_KEY", raising=False)
337 try:
338 import_cloud_document("cloud-x", kb_dir, "pageindex-cloud:cloud-x")
339 except RuntimeError as exc:
340 assert "PAGEINDEX_API_KEY" in str(exc)
341 else:
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

Callers

nothing calls this directly

Calls 1

import_cloud_documentFunction · 0.90

Tested by

no test coverage detected