(self, tmp_path)
| 441 | assert "No LLM API key found" in capsys.readouterr().out |
| 442 | |
| 443 | def test_extra_headers_stashed_from_config(self, tmp_path): |
| 444 | from openkb.cli import _setup_llm_key |
| 445 | from openkb.config import get_extra_headers |
| 446 | |
| 447 | kb = self._make_kb( |
| 448 | tmp_path, |
| 449 | "github_copilot/gpt-5-mini", |
| 450 | extra_headers={ |
| 451 | "Editor-Version": "vscode/1.95.0", |
| 452 | "Copilot-Integration-Id": "vscode-chat", |
| 453 | }, |
| 454 | ) |
| 455 | _setup_llm_key(kb) |
| 456 | assert get_extra_headers() == { |
| 457 | "Editor-Version": "vscode/1.95.0", |
| 458 | "Copilot-Integration-Id": "vscode-chat", |
| 459 | } |
| 460 | |
| 461 | def test_extra_headers_reset_when_config_has_none(self, tmp_path): |
| 462 | from openkb.cli import _setup_llm_key |
nothing calls this directly
no test coverage detected