Beispiel #1
0
 def test_load_config_bad_event(self):
     """AppConfig - Load config with a bad event"""
     # Remove one of the required keys from the state
     event = get_event(self._test_app_name)
     del event['destination_function_name']
     AppConfig.load_config(event,
                           get_mock_lambda_context(self._test_app_name))
Beispiel #2
0
 def __init__(self, event, context):
     self._config = AppConfig.load_config(event, context)
     self._batcher = Batcher(self._config.function_name, self._config.destination_function)
     self._gathered_log_count = 0
     self._more_to_poll = False
     self._poll_count = 0
     self._last_timestamp = 0
Beispiel #3
0
 def setup(self):
     """Setup before each method"""
     # pylint: disable=attribute-defined-outside-init
     self._test_app_name = 'test_app'
     put_mock_params(self._test_app_name)
     self._event = get_event(self._test_app_name)
     self._context = get_mock_lambda_context(self._test_app_name)
     self._config = AppConfig.load_config(self._event, self._context)