Ambient first-party / google-cloud env vars must not leak into these tests.
(monkeypatch: pytest.MonkeyPatch)
| 28 | |
| 29 | @pytest.fixture(autouse=True) |
| 30 | def _isolate_environment(monkeypatch: pytest.MonkeyPatch) -> None: # pyright: ignore[reportUnusedFunction] |
| 31 | """Ambient first-party / google-cloud env vars must not leak into these tests.""" |
| 32 | for name in ( |
| 33 | "ANTHROPIC_GOOGLE_CLOUD_PROJECT", |
| 34 | "ANTHROPIC_GOOGLE_CLOUD_LOCATION", |
| 35 | "ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID", |
| 36 | "ANTHROPIC_GOOGLE_CLOUD_BASE_URL", |
| 37 | "GOOGLE_CLOUD_PROJECT", |
| 38 | "ANTHROPIC_API_KEY", |
| 39 | "ANTHROPIC_AUTH_TOKEN", |
| 40 | "ANTHROPIC_BASE_URL", |
| 41 | "ANTHROPIC_CUSTOM_HEADERS", |
| 42 | "ANTHROPIC_WEBHOOK_SIGNING_KEY", |
| 43 | "ANTHROPIC_CONFIG_DIR", |
| 44 | "ANTHROPIC_PROFILE", |
| 45 | ): |
| 46 | monkeypatch.delenv(name, raising=False) |
| 47 | |
| 48 | |
| 49 | class _FakeCredentials: |
nothing calls this directly
no outgoing calls
no test coverage detected