-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add optional account association for Authorized User credential…
…s. (#1458) * feat: Add optional account association for Authorized User credentials. * chore: Refresh system test creds. * Fix two missed constructors.
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -793,6 +793,12 @@ def test_with_universe_domain(self): | |
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("[email protected]") | ||
assert new_creds.account == "[email protected]" | ||
|
||
def test_with_token_uri(self): | ||
info = AUTH_USER_INFO.copy() | ||
|
||
|
@@ -888,6 +894,7 @@ def test_to_json(self): | |
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"]) | ||
|