diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-02-08 10:32:02 +0300 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-02-09 19:18:50 +0300 |
commit | 84dc6b2fba247c7b3df7a468b443fa44aa80f57f (patch) | |
tree | f116fe7f4a4bfae7f39fb2bc8dea7cea70eeaadc /contrib/python/google-auth/py3/tests/oauth2/test_credentials.py | |
parent | 3947fb601c126c5036e117f1672a357ac7bc4a71 (diff) | |
download | ydb-84dc6b2fba247c7b3df7a468b443fa44aa80f57f.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/python/google-auth/py3/tests/oauth2/test_credentials.py')
-rw-r--r-- | contrib/python/google-auth/py3/tests/oauth2/test_credentials.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/python/google-auth/py3/tests/oauth2/test_credentials.py b/contrib/python/google-auth/py3/tests/oauth2/test_credentials.py index 5f1dcf3cbf..67b6b9c1ad 100644 --- a/contrib/python/google-auth/py3/tests/oauth2/test_credentials.py +++ b/contrib/python/google-auth/py3/tests/oauth2/test_credentials.py @@ -794,6 +794,12 @@ class TestCredentials(object): new_creds = creds.with_universe_domain("dummy_universe.com") assert new_creds.universe_domain == "dummy_universe.com" + def test_with_account(self): + creds = credentials.Credentials(token="token") + assert creds.account == "" + new_creds = creds.with_account("mock@example.com") + assert new_creds.account == "mock@example.com" + def test_with_token_uri(self): info = AUTH_USER_INFO.copy() @@ -889,6 +895,7 @@ class TestCredentials(object): assert json_asdict.get("client_secret") == creds.client_secret assert json_asdict.get("expiry") == info["expiry"] assert json_asdict.get("universe_domain") == creds.universe_domain + assert json_asdict.get("account") == creds.account # Test with a `strip` arg json_output = creds.to_json(strip=["client_secret"]) |