A fully-resolvable Anthropic profile (config + oauth credentials + base_url) that the base client's credential chain would adopt if it ever ran.
(tmp_path: pathlib.Path)
| 1222 | |
| 1223 | @pytest.fixture |
| 1224 | def profile_config_dir(tmp_path: pathlib.Path) -> pathlib.Path: |
| 1225 | """A fully-resolvable Anthropic profile (config + oauth credentials + base_url) |
| 1226 | that the base client's credential chain would adopt if it ever ran.""" |
| 1227 | (tmp_path / "configs").mkdir() |
| 1228 | (tmp_path / "credentials").mkdir() |
| 1229 | (tmp_path / "configs" / "default.json").write_text( |
| 1230 | json.dumps( |
| 1231 | { |
| 1232 | "version": "1.0", |
| 1233 | "organization_id": "org_profile_should_not_leak", |
| 1234 | "base_url": "https://profile-gateway.example.com", |
| 1235 | "authentication": {"type": "user_oauth"}, |
| 1236 | } |
| 1237 | ) |
| 1238 | ) |
| 1239 | (tmp_path / "credentials" / "default.json").write_text( |
| 1240 | json.dumps( |
| 1241 | { |
| 1242 | "version": "1.0", |
| 1243 | "type": "oauth_token", |
| 1244 | "access_token": "profile-oauth-token-should-not-leak", |
| 1245 | "refresh_token": "profile-refresh-token", |
| 1246 | "expires_at": 4102444800000, |
| 1247 | } |
| 1248 | ) |
| 1249 | ) |
| 1250 | return tmp_path |
| 1251 | |
| 1252 | |
| 1253 | @pytest.mark.respx() |
nothing calls this directly
no outgoing calls
no test coverage detected