File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -77,9 +77,9 @@ def __init__(
7777 # Management Initialization
7878 mgmt_http_client = HTTPClient (
7979 project_id = project_id ,
80- base_url = auth_http_client . base_url ,
81- timeout_seconds = auth_http_client . timeout_seconds ,
82- secure = auth_http_client . secure ,
80+ base_url = base_url ,
81+ timeout_seconds = timeout_seconds ,
82+ secure = not skip_verify ,
8383 management_key = management_key or os .getenv ("DESCOPE_MANAGEMENT_KEY" ),
8484 )
8585 self ._mgmt = MGMT (
Original file line number Diff line number Diff line change @@ -1067,6 +1067,19 @@ def test_base_url_setting(self):
10671067 # Verify that the base_url is set in the mgmt HTTP client
10681068 self .assertEqual (client ._mgmt ._http .base_url , custom_base_url )
10691069
1070+ def test_base_url_none (self ):
1071+ """Test that base_url=None uses default base URL from environment or project ID"""
1072+ # When base_url is None, it should use DESCOPE_BASE_URI env var or computed default
1073+ client = DescopeClient (
1074+ project_id = self .dummy_project_id ,
1075+ base_url = None ,
1076+ public_key = self .public_key_dict ,
1077+ )
1078+
1079+ expected_base_url = common .DEFAULT_BASE_URL
1080+ self .assertEqual (client ._auth .http_client .base_url , expected_base_url )
1081+ self .assertEqual (client ._mgmt ._http .base_url , expected_base_url )
1082+
10701083
10711084if __name__ == "__main__" :
10721085 unittest .main ()
You can’t perform that action at this time.
0 commit comments