(self, tmp_path)
| 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" |
nothing calls this directly
no test coverage detected