test_awsclient.py 文件源码

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

项目:chalice 作者: aws 项目源码 文件源码
def test_unexpected_error_is_propagated(self, stubbed_session):
        stubbed_session.stub('iam').get_role(RoleName='Yes').raises_error(
            error_code='InternalError',
            message='Foo')
        stubbed_session.activate_stubs()
        awsclient = TypedAWSClient(stubbed_session)
        with pytest.raises(botocore.exceptions.ClientError):
            awsclient.get_role_arn_for_name(name='Yes')
        stubbed_session.verify_stubs()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号