aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/google-auth/py3/tests/oauth2/test_service_account.py
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-10-07 15:49:08 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-10-07 15:49:08 +0000
commit6e4a5b7ec90b12f50ed6af6bb3bbd214d4aaaa35 (patch)
tree7bd4c53a7df4f129e96c095353cc73944f6f5971 /contrib/python/google-auth/py3/tests/oauth2/test_service_account.py
parenta91cf35875165a1e7b20cb79925892e304c7b911 (diff)
parent1c145de846055758e1cf1a78a53d9b06ecf4e697 (diff)
downloadydb-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.py17
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