test_awsclient.py 文件源码

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

项目:chalice 作者: aws 项目源码 文件源码
def test_lambda_function_bad_error_propagates(self, stubbed_session):
        stubbed_session.stub('lambda').get_function(FunctionName='myappname')\
                .raises_error(error_code='UnexpectedError',
                              message='Unknown')

        stubbed_session.activate_stubs()

        awsclient = TypedAWSClient(stubbed_session)
        with pytest.raises(botocore.exceptions.ClientError):
            awsclient.lambda_function_exists(name='myappname')

        stubbed_session.verify_stubs()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号