def test_raise_exception_for_reading_json(self):
credential_file = 'any_file'
extra_help = ' be good'
error = client.ApplicationDefaultCredentialsError('stuff happens')
expected_err_msg = ('An error was encountered while reading '
'json file: ' + credential_file +
extra_help + ': ' + str(error))
with self.assertRaisesRegexp(client.ApplicationDefaultCredentialsError,
expected_err_msg):
client._raise_exception_for_reading_json(
credential_file, extra_help, error)
评论列表
文章目录