mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix: Remove fallback to cached exchanged credential in _load_existing_credential
The _load_existing_credential method in CredentialManager will now only attempt to load credentials from the credential service and will no longer check the AuthConfig's exchanged_auth_credential cache. Close #3772 Co-authored-by: George Weale <gweale@google.com> PiperOrigin-RevId: 852944533
This commit is contained in:
committed by
Copybara-Service
parent
30d3411d60
commit
1ae0e16b2c
@@ -133,7 +133,7 @@ class TestCredentialManager:
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_load_existing_credential_already_exchanged(self):
|
||||
"""Test _load_existing_credential when credential is already exchanged."""
|
||||
"""Test _load_existing_credential ignores shared config cache."""
|
||||
auth_config = Mock(spec=AuthConfig)
|
||||
mock_credential = Mock(spec=AuthCredential)
|
||||
auth_config.exchanged_auth_credential = mock_credential
|
||||
@@ -145,7 +145,7 @@ class TestCredentialManager:
|
||||
|
||||
result = await manager._load_existing_credential(callback_context)
|
||||
|
||||
assert result == mock_credential
|
||||
assert result is None
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_load_existing_credential_with_credential_service(self):
|
||||
|
||||
Reference in New Issue
Block a user