def test_get_adc_from_env_var_service_account(self, *stubs):
# Set up stubs.
get_well_known, get_env_file, in_gae, in_gce = stubs
get_env_file.return_value = datafile(
os.path.join('gcloud', client._WELL_KNOWN_CREDENTIALS_FILE))
credentials = client.GoogleCredentials.get_application_default()
self.validate_service_account_credentials(credentials)
get_env_file.assert_called_once_with()
get_well_known.assert_not_called()
in_gae.assert_not_called()
in_gce.assert_not_called()
评论列表
文章目录