MCPcopy
hub / github.com/anthropics/anthropic-sdk-python / test_base_url_setter

Method test_base_url_setter

tests/test_client.py:810–818  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

808 assert response.foo == 2
809
810 def test_base_url_setter(self) -> None:
811 client = Anthropic(base_url="https://example.com/from_init", api_key=api_key, _strict_response_validation=True)
812 assert client.base_url == "https://example.com/from_init/"
813
814 client.base_url = "https://example.com/from_setter" # type: ignore[assignment]
815
816 assert client.base_url == "https://example.com/from_setter/"
817
818 client.close()
819
820 def test_base_url_env(self) -> None:
821 with update_env(ANTHROPIC_BASE_URL="http://localhost:5000/from/env"):

Callers

nothing calls this directly

Calls 2

closeMethod · 0.95
AnthropicClass · 0.90

Tested by

no test coverage detected