@@ -467,6 +467,14 @@ def test_idempotency_header_options(self, respx_mock: MockRouter) -> None:
467
467
)
468
468
assert response .request .headers .get ("Idempotency-Key" ) == "custom-key"
469
469
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
+
470
478
def test_base_url_env (self ) -> None :
471
479
with update_env (ORB_BASE_URL = "http://localhost:5000/from/env" ):
472
480
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:
1121
1129
)
1122
1130
assert response .request .headers .get ("Idempotency-Key" ) == "custom-key"
1123
1131
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
+
1124
1140
def test_base_url_env (self ) -> None :
1125
1141
with update_env (ORB_BASE_URL = "http://localhost:5000/from/env" ):
1126
1142
client = AsyncOrb (api_key = api_key , _strict_response_validation = True )
0 commit comments