@@ -467,6 +467,14 @@ def test_idempotency_header_options(self, respx_mock: MockRouter) -> None:
467467 )
468468 assert response .request .headers .get ("Idempotency-Key" ) == "custom-key"
469469
470+ def test_base_url_setter (self ) -> None :
471+ client = Orb (base_url = "https://example.com/from_init" , api_key = api_key , _strict_response_validation = True )
472+ assert client .base_url == "https://example.com/from_init/"
473+
474+ client .base_url = "https://example.com/from_setter" # type: ignore[assignment]
475+
476+ assert client .base_url == "https://example.com/from_setter/"
477+
470478 def test_base_url_env (self ) -> None :
471479 with update_env (ORB_BASE_URL = "http://localhost:5000/from/env" ):
472480 client = Orb (api_key = api_key , _strict_response_validation = True )
@@ -1121,6 +1129,14 @@ async def test_idempotency_header_options(self, respx_mock: MockRouter) -> None:
11211129 )
11221130 assert response .request .headers .get ("Idempotency-Key" ) == "custom-key"
11231131
1132+ def test_base_url_setter (self ) -> None :
1133+ client = AsyncOrb (base_url = "https://example.com/from_init" , api_key = api_key , _strict_response_validation = True )
1134+ assert client .base_url == "https://example.com/from_init/"
1135+
1136+ client .base_url = "https://example.com/from_setter" # type: ignore[assignment]
1137+
1138+ assert client .base_url == "https://example.com/from_setter/"
1139+
11241140 def test_base_url_env (self ) -> None :
11251141 with update_env (ORB_BASE_URL = "http://localhost:5000/from/env" ):
11261142 client = AsyncOrb (api_key = api_key , _strict_response_validation = True )
0 commit comments