Home / Function/ test_env_var_base_url_override() — anthropic-sdk-python Function Reference

test_env_var_base_url_override() — anthropic-sdk-python Function Reference

Architecture documentation for the test_env_var_base_url_override() function in test_vertex.py from the anthropic-sdk-python codebase.

Function python AnthropicClient AsyncAPI calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  39ea5662_3fa7_a372_9984_14d2b99f4739["test_env_var_base_url_override()"]
  4a282b80_48ff_4ba8_f27f_bad6b030b947["TestAnthropicVertex"]
  39ea5662_3fa7_a372_9984_14d2b99f4739 -->|defined in| 4a282b80_48ff_4ba8_f27f_bad6b030b947
  85e9c113_3b40_67c3_aedb_4effef7d0a15["test_env_var_base_url_override()"]
  85e9c113_3b40_67c3_aedb_4effef7d0a15 -->|calls| 39ea5662_3fa7_a372_9984_14d2b99f4739
  85e9c113_3b40_67c3_aedb_4effef7d0a15["test_env_var_base_url_override()"]
  39ea5662_3fa7_a372_9984_14d2b99f4739 -->|calls| 85e9c113_3b40_67c3_aedb_4effef7d0a15
  style 39ea5662_3fa7_a372_9984_14d2b99f4739 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/lib/test_vertex.py lines 134–146

    def test_env_var_base_url_override(self, monkeypatch: pytest.MonkeyPatch) -> None:
        """Test that ANTHROPIC_VERTEX_BASE_URL environment variable does not override client arg."""
        test_url = "https://custom-endpoint.googleapis.com/v1"

        monkeypatch.setenv("ANTHROPIC_VERTEX_BASE_URL", test_url)

        client = AnthropicVertex(
            region="global",  # we expect this to get ignored since the user is providing a base_url
            project_id="test-project",
            access_token="fake-token",
            base_url="https://test.googleapis.com/v1",
        )
        assert str(client.base_url).rstrip("/") == "https://test.googleapis.com/v1"

Subdomains

Frequently Asked Questions

What does test_env_var_base_url_override() do?
test_env_var_base_url_override() is a function in the anthropic-sdk-python codebase, defined in tests/lib/test_vertex.py.
Where is test_env_var_base_url_override() defined?
test_env_var_base_url_override() is defined in tests/lib/test_vertex.py at line 134.
What does test_env_var_base_url_override() call?
test_env_var_base_url_override() calls 1 function(s): test_env_var_base_url_override.
What calls test_env_var_base_url_override()?
test_env_var_base_url_override() is called by 1 function(s): test_env_var_base_url_override.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free