mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix: Unable to acquire impersonated credentials
Merge https://github.com/google/adk-python/pull/2003 add scope "https://www.googleapis.com/auth/cloud-platform" within google.auth.default COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/2003 from hsuyuming:fix/issue_2001_support_impersonated_credential 8874a367273aca98460f7f250bfc4690f883ebbe PiperOrigin-RevId: 788656025
This commit is contained in:
committed by
Copybara-Service
parent
de6ebddcd2
commit
9db5d9a3e8
+4
-1
@@ -125,7 +125,10 @@ def test_exchange_credential_use_default_credential_success(
|
||||
assert result.auth_type == AuthCredentialTypes.HTTP
|
||||
assert result.http.scheme == "bearer"
|
||||
assert result.http.credentials.token == "mock_access_token"
|
||||
mock_google_auth_default.assert_called_once()
|
||||
# Verify google.auth.default is called with the correct scopes parameter
|
||||
mock_google_auth_default.assert_called_once_with(
|
||||
scopes=["https://www.googleapis.com/auth/cloud-platform"]
|
||||
)
|
||||
mock_credentials.refresh.assert_called_once()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user