MCPcopy Index your code
hub / github.com/github/spec-kit / test_valid_github_config

Method test_valid_github_config

tests/test_authentication.py:78–92  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

76 assert load_auth_config(tmp_path / "nonexistent.json") == []
77
78 def test_valid_github_config(self, tmp_path):
79 cfg = tmp_path / "auth.json"
80 cfg.write_text(json.dumps({
81 "providers": [{
82 "hosts": ["github.com"],
83 "provider": "github",
84 "auth": "bearer",
85 "token_env": "GH_TOKEN",
86 }]
87 }))
88 entries = load_auth_config(cfg)
89 assert len(entries) == 1
90 assert entries[0].provider == "github"
91 assert entries[0].auth == "bearer"
92 assert entries[0].token_env == "GH_TOKEN"
93
94 def test_valid_ado_config(self, tmp_path):
95 cfg = tmp_path / "auth.json"

Callers

nothing calls this directly

Calls 1

load_auth_configFunction · 0.90

Tested by

no test coverage detected