(self, kb_dir, sample_tree, monkeypatch)
| 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 | |
| 359 | def test_write_long_doc_artifacts_writes_json_and_summary(kb_dir, sample_tree): |
nothing calls this directly
no test coverage detected