diff --git a/stream_alert/alert_processor/outputs/output_base.py b/stream_alert/alert_processor/outputs/output_base.py index 4302293c7..b3a24ba17 100644 --- a/stream_alert/alert_processor/outputs/output_base.py +++ b/stream_alert/alert_processor/outputs/output_base.py @@ -145,7 +145,7 @@ class OutputDispatcher(object): def __init__(self, region, account_id, prefix, config): self.region = region self.account_id = account_id - self.secrets_bucket = '{}_streamalert_secrets'.format(prefix) + self.secrets_bucket = '{}.streamalert.secrets'.format(prefix) self.config = config @staticmethod diff --git a/stream_alert_cli/helpers.py b/stream_alert_cli/helpers.py index cf8a833b7..029e29fba 100644 --- a/stream_alert_cli/helpers.py +++ b/stream_alert_cli/helpers.py @@ -418,7 +418,6 @@ def setup_mock_firehose_delivery_streams(config): create_delivery_stream(region, stream_name, prefix) -@mock_dynamodb2 def setup_mock_dynamodb_ioc_table(config): """Mock DynamoDB IOC table for rule testing @@ -489,7 +488,6 @@ def setup_mock_dynamodb_ioc_table(config): TableName=table_name) -@mock_dynamodb2 def setup_mock_alerts_table(table_name): """Create a mock DynamoDB alerts table used by rule processor, alert processor, alert merger""" boto3.client('dynamodb').create_table( diff --git a/tests/unit/stream_alert_alert_merger/test_main.py b/tests/unit/stream_alert_alert_merger/test_main.py index ba05a61a3..10bdea76b 100644 --- a/tests/unit/stream_alert_alert_merger/test_main.py +++ b/tests/unit/stream_alert_alert_merger/test_main.py @@ -32,7 +32,6 @@ _ALERT_PROCESSOR_TIMEOUT_SEC = 60 -@mock_dynamodb2 class TestAlertTable(object): """Tests for merger/main.py:AlertTable""" @@ -40,6 +39,9 @@ class TestAlertTable(object): def setup(self): """Alert Merger - Alert Table - Add mock alerts to the table""" # pylint: disable=attribute-defined-outside-init + self.dynamo_mock = mock_dynamodb2() + self.dynamo_mock.start() + setup_mock_alerts_table(_ALERTS_TABLE) self.alert_table = main.AlertTable(_ALERTS_TABLE) @@ -62,6 +64,10 @@ def setup(self): }) }) + def teardown(self): + """Alert Merger - Teardown - Stop Mocks""" + self.dynamo_mock.stop() + def test_paginate_multiple(self): """Alert Merger - Alert Table - Paginate Traverses Multiple Pages""" def mock_table_op(**kwargs):