-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94746b9
commit f085051
Showing
2 changed files
with
5 additions
and
4 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
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 |
---|---|---|
|
@@ -798,7 +798,6 @@ def test_refresh_iam_flow(self, call_iam_generate_id_token_endpoint): | |
assert target_audience == "https://example.com" | ||
decoded_access_token = jwt.decode(access_token, verify=False) | ||
assert decoded_access_token["scope"] == "https://www.googleapis.com/auth/iam" | ||
assert universe_domain == "googleapis.com" | ||
|
||
@mock.patch( | ||
"google.oauth2._client.call_iam_generate_id_token_endpoint", autospec=True | ||
|
@@ -818,13 +817,12 @@ def test_refresh_iam_flow_non_gdu(self, call_iam_generate_id_token_endpoint): | |
assert req == request | ||
assert ( | ||
iam_endpoint | ||
== "https://iamcredentials.{}/v1/projects/-/serviceAccounts/{}:generateIdToken" | ||
== "https://iamcredentials.fake-universe/v1/projects/-/serviceAccounts/{}:generateIdToken" | ||
) | ||
assert signer_email == "[email protected]" | ||
assert target_audience == "https://example.com" | ||
decoded_access_token = jwt.decode(access_token, verify=False) | ||
assert decoded_access_token["scope"] == "https://www.googleapis.com/auth/iam" | ||
assert universe_domain == "fake-universe" | ||
|
||
@mock.patch("google.oauth2._client.id_token_jwt_grant", autospec=True) | ||
def test_before_request_refreshes(self, id_token_jwt_grant): | ||
|