Skip to content

Commit 35edd83

Browse files
yinghsienwucopybara-github
authored andcommitted
fix: google_auth_mock universe domain
PiperOrigin-RevId: 936982917
1 parent dbb5b20 commit 35edd83

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/unit/aiplatform/conftest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,13 @@
6262
@pytest.fixture(scope="module")
6363
def google_auth_mock():
6464
with mock.patch.object(auth, "default") as google_auth_mock:
65+
creds = auth_credentials.AnonymousCredentials()
66+
try:
67+
creds._universe_domain = "googleapis.com"
68+
except AttributeError:
69+
pass
6570
google_auth_mock.return_value = (
66-
auth_credentials.AnonymousCredentials(),
71+
creds,
6772
"test-project",
6873
)
6974
yield google_auth_mock

0 commit comments

Comments
 (0)