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

Method test_extra_headers_stashed_from_config

tests/test_cli.py:443–459  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

_make_kbMethod · 0.95
_setup_llm_keyFunction · 0.90
get_extra_headersFunction · 0.90

Tested by

no test coverage detected