Skip to content

Commit 02bb9cf

Browse files
committed
fix broken tests
1 parent f756ba6 commit 02bb9cf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/compute_engine/test_credentials.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,10 @@ def test_default_state(self):
9999
)
100100
@mock.patch("google.auth.compute_engine._metadata.get", autospec=True)
101101
def test_refresh_success_with_service_account_email(self, get, utcnow):
102-
service_account_email = "[email protected]"
103-
self.credentials.service_account_email = service_account_email
104102
get.side_effect = [
105103
{
106104
# First request is for sevice account info.
107-
"email": service_account_email,
105+
"email": FAKE_SERVICE_ACCOUNT_EMAIL,
108106
"scopes": ["one", "two"],
109107
},
110108
{
@@ -122,7 +120,7 @@ def test_refresh_success_with_service_account_email(self, get, utcnow):
122120
assert self.credentials.expiry == (utcnow() + datetime.timedelta(seconds=500))
123121

124122
# Check the credential info
125-
assert self.credentials.service_account_email == service_account_email
123+
assert self.credentials.service_account_email == FAKE_SERVICE_ACCOUNT_EMAIL
126124
assert self.credentials._scopes == ["one", "two"]
127125

128126
# Check that the credentials are valid (have a token and are not

0 commit comments

Comments
 (0)