class_docstr: Tests for alert_processor/main.py
class_docstr_tok: ["Tests","for","alert_processor\/main.py"]
docstr: Alert Processor - Run With Just the Alert Key
docstr_tok: ["Alert","Processor","-","Run","With","Just","the","Alert","Key"]
code: def test_run_get_alert_from_dynamo(
      self, mock_send_alerts, mock_update_table
  ):
      """Alert Processor - Run With Just the Alert Key"""
      self.processor.alerts_table.get_alert_record = MagicMock(
          return_value=self.alert.dynamo_record()
      )
      result = self.processor.run(self.alert.dynamo_key)
      assert_equal({"slack:unit-test-channel": True}, result)
  
      self.processor.alerts_table.get_alert_record.assert_called_once_with(
          self.alert.rule_name, self.alert.alert_id
      )
      mock_send_alerts.assert_called_once()
      mock_update_table.assert_called_once()
  
imports: import os
  from mock import ANY, MagicMock, Mock, patch
  from nose.tools import assert_equal, assert_is_instance, assert_is_none
  from streamalert.alert_processor.main import AlertProcessor, handler
  from streamalert.alert_processor.outputs.output_base import OutputDispatcher
  from streamalert.shared.alert import Alert
  from streamalert.shared.config import load_config
  from streamalert.shared.normalize import Normalizer
  from tests.unit.streamalert.alert_processor import ALERTS_TABLE, MOCK_ENV
label_desc: Use image node_id 14 for calling the TestAlertProcessor obj's underlying member method code with example usage: obj.test_run_get_alert_from_dynamo(mock_send_alerts, mock_update_table) without return types