1414 _build_mcp_url ,
1515 _resolve_dependency ,
1616 _CREDENTIALS_PATH_ENV ,
17- _SERVICE_BINDING_ROOT_ENV ,
1817 _BINDING_TYPE ,
1918 _BINDING_TYPE_FILE ,
2019 _CREDENTIALS_FILE ,
@@ -59,7 +58,7 @@ def test_detect_from_env_var_path(self, tmp_path):
5958
6059 def test_detect_from_env_var_path_file_not_exists (self , tmp_path ):
6160 """Return None when env var path doesn't exist."""
62- env = {_CREDENTIALS_PATH_ENV : "/nonexistent/path" , _SERVICE_BINDING_ROOT_ENV : str (tmp_path )}
61+ env = {_CREDENTIALS_PATH_ENV : "/nonexistent/path" , "SERVICE_BINDING_ROOT" : str (tmp_path )}
6362 with patch .dict (os .environ , env , clear = False ):
6463 result = detect_customer_agent_credentials ()
6564 assert result is None
@@ -68,7 +67,7 @@ def test_detect_from_service_binding_root(self, tmp_path):
6867 """Detect credentials by scanning SERVICE_BINDING_ROOT for a binding with matching type file."""
6968 creds_file = self ._make_binding (tmp_path )
7069
71- env = {_SERVICE_BINDING_ROOT_ENV : str (tmp_path )}
70+ env = {"SERVICE_BINDING_ROOT" : str (tmp_path )}
7271 with patch .dict (os .environ , env , clear = False ):
7372 os .environ .pop (_CREDENTIALS_PATH_ENV , None )
7473 result = detect_customer_agent_credentials ()
@@ -80,7 +79,7 @@ def test_detect_from_default_path(self, tmp_path):
8079
8180 with patch .dict (os .environ , {}, clear = False ):
8281 os .environ .pop (_CREDENTIALS_PATH_ENV , None )
83- os .environ .pop (_SERVICE_BINDING_ROOT_ENV , None )
82+ os .environ .pop ("SERVICE_BINDING_ROOT" , None )
8483 with patch ("sap_cloud_sdk.agentgateway._customer._DEFAULT_BINDING_ROOT" , str (tmp_path )):
8584 result = detect_customer_agent_credentials ()
8685 assert result == str (creds_file )
@@ -92,7 +91,7 @@ def test_skips_binding_with_wrong_type(self, tmp_path):
9291 (wrong_dir / _BINDING_TYPE_FILE ).write_text ("something-else" )
9392 (wrong_dir / _CREDENTIALS_FILE ).write_text ('{"clientid": "wrong"}' )
9493
95- env = {_SERVICE_BINDING_ROOT_ENV : str (tmp_path )}
94+ env = {"SERVICE_BINDING_ROOT" : str (tmp_path )}
9695 with patch .dict (os .environ , env , clear = False ):
9796 os .environ .pop (_CREDENTIALS_PATH_ENV , None )
9897 result = detect_customer_agent_credentials ()
@@ -104,14 +103,14 @@ def test_service_binding_root_takes_priority_over_default(self, tmp_path):
104103 sbr_dir .mkdir ()
105104 creds_file = self ._make_binding (sbr_dir )
106105
107- with patch .dict (os .environ , {_SERVICE_BINDING_ROOT_ENV : str (sbr_dir )}, clear = False ):
106+ with patch .dict (os .environ , {"SERVICE_BINDING_ROOT" : str (sbr_dir )}, clear = False ):
108107 os .environ .pop (_CREDENTIALS_PATH_ENV , None )
109108 result = detect_customer_agent_credentials ()
110109 assert result == str (creds_file )
111110
112111 def test_no_credentials_returns_none (self , tmp_path ):
113112 """Return None when no binding with matching type is found."""
114- env = {_SERVICE_BINDING_ROOT_ENV : str (tmp_path )}
113+ env = {"SERVICE_BINDING_ROOT" : str (tmp_path )}
115114 with patch .dict (os .environ , env , clear = False ):
116115 os .environ .pop (_CREDENTIALS_PATH_ENV , None )
117116 result = detect_customer_agent_credentials ()
@@ -128,7 +127,7 @@ def test_env_var_takes_priority_over_service_binding_root(self, tmp_path):
128127
129128 env = {
130129 _CREDENTIALS_PATH_ENV : str (creds_file ),
131- _SERVICE_BINDING_ROOT_ENV : str (sbr_dir ),
130+ "SERVICE_BINDING_ROOT" : str (sbr_dir ),
132131 }
133132 with patch .dict (os .environ , env , clear = False ):
134133 result = detect_customer_agent_credentials ()
0 commit comments