예제 #1
0
 def test_lambda_client_error_wording_for_update(self):
     lambda_error = LambdaClientError(
         Exception('My Exception'),
         context=LambdaErrorContext(
             function_name='foo',
             client_method_name='update_function_code',
             deployment_size=1024**2))
     deploy_error = ChaliceDeploymentError(lambda_error)
     deploy_error_msg = str(deploy_error)
     assert ('sending your chalice handler code to '
             'Lambda to update function' in deploy_error_msg)
예제 #2
0
 def test_lambda_client_error(self):
     lambda_error = LambdaClientError(
         Exception('My Exception'),
         context=LambdaErrorContext(function_name='foo',
                                    client_method_name='create_function',
                                    deployment_size=1024**2))
     deploy_error = ChaliceDeploymentError(lambda_error)
     deploy_error_msg = str(deploy_error)
     assert ('ERROR - While sending your chalice handler code to '
             'Lambda to create function \n"foo"' in deploy_error_msg)
     assert 'My Exception' in deploy_error_msg