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.

Entity Profile

Dependency Diagram

graph TD
  e54272ce_4843_54c7_c909_dfdf8cebcccb["test_env_var_base_url_override()"]
  2213d9b2_c50c_d5a5_6ce2_effd41b0c3bb["TestAsyncAnthropicVertex"]
  e54272ce_4843_54c7_c909_dfdf8cebcccb -->|defined in| 2213d9b2_c50c_d5a5_6ce2_effd41b0c3bb
  a0832a87_0e54_34d3_d6b3_e68f71c5ad10["test_env_var_base_url_override()"]
  a0832a87_0e54_34d3_d6b3_e68f71c5ad10 -->|calls| e54272ce_4843_54c7_c909_dfdf8cebcccb
  a0832a87_0e54_34d3_d6b3_e68f71c5ad10["test_env_var_base_url_override()"]
  e54272ce_4843_54c7_c909_dfdf8cebcccb -->|calls| a0832a87_0e54_34d3_d6b3_e68f71c5ad10
  style e54272ce_4843_54c7_c909_dfdf8cebcccb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/lib/test_vertex.py lines 266–278

    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 = AsyncAnthropicVertex(
            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 266.
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