def test_handler_no_unique_buckets(self, _, mock_config, mock_logging):
        """Athena - Handler - No Unique Buckets"""
        test_sqs_client = TestStreamAlertSQSClient()
        test_sqs_client.setup()

        handler(None, None)

        mock_config.assert_called()
        assert_true(mock_logging.error.called)
    def test_handler_no_received_messages(self, mock_sqs_client, mock_config,
                                          mock_logging):
        """Athena - Handler - No Receieved Messages"""
        test_sqs_client = TestStreamAlertSQSClient()
        test_sqs_client.setup()
        mock_sqs_client.return_value.received_messages = []

        handler(None, None)

        mock_config.assert_called()
        assert_true(mock_logging.info.called)
Exemple #3
0
    def test_handler_no_unique_buckets(self, mock_sqs_client, mock_config,
                                       mock_logging):
        """Athena - Handler - No Unique Buckets"""
        test_sqs_client = TestStreamAlertSQSClient()
        test_sqs_client.setup()
        mock_sqs_client.return_value.unique_s3_buckets_and_keys = lambda: {}

        handler(None, None)

        mock_config.assert_called()
        assert_true(mock_logging.error.called)