test_client.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:deb-python-oauth2client 作者: openstack 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号