diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-10-07 15:49:08 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-10-07 15:49:08 +0000 |
commit | 6e4a5b7ec90b12f50ed6af6bb3bbd214d4aaaa35 (patch) | |
tree | 7bd4c53a7df4f129e96c095353cc73944f6f5971 /contrib/python/google-auth/py3/tests/oauth2/test_service_account.py | |
parent | a91cf35875165a1e7b20cb79925892e304c7b911 (diff) | |
parent | 1c145de846055758e1cf1a78a53d9b06ecf4e697 (diff) | |
download | ydb-6e4a5b7ec90b12f50ed6af6bb3bbd214d4aaaa35.tar.gz |
Merge branch 'rightlib' into mergelibs-241007-1548
Diffstat (limited to 'contrib/python/google-auth/py3/tests/oauth2/test_service_account.py')
-rw-r--r-- | contrib/python/google-auth/py3/tests/oauth2/test_service_account.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/python/google-auth/py3/tests/oauth2/test_service_account.py b/contrib/python/google-auth/py3/tests/oauth2/test_service_account.py index 0dbe316a0f..fe02e828e7 100644 --- a/contrib/python/google-auth/py3/tests/oauth2/test_service_account.py +++ b/contrib/python/google-auth/py3/tests/oauth2/test_service_account.py @@ -69,6 +69,23 @@ class TestCredentials(object): universe_domain=universe_domain, ) + def test_get_cred_info(self): + credentials = self.make_credentials() + assert not credentials.get_cred_info() + + credentials._cred_file_path = "/path/to/file" + assert credentials.get_cred_info() == { + "credential_source": "/path/to/file", + "credential_type": "service account credentials", + "principal": "service-account@example.com", + } + + def test__make_copy_get_cred_info(self): + credentials = self.make_credentials() + credentials._cred_file_path = "/path/to/file" + cred_copy = credentials._make_copy() + assert cred_copy._cred_file_path == "/path/to/file" + def test_constructor_no_universe_domain(self): credentials = service_account.Credentials( SIGNER, self.SERVICE_ACCOUNT_EMAIL, self.TOKEN_URI, universe_domain=None |