docstr: AlertPublisher - AlertPublisherRepository - assemble() - Dict with Key -> String
docstr_tok: ["AlertPublisher","-","AlertPublisherRepository","-","assemble","(",")","-","Dict","with","Key","-",">","String"]
code: def test_assemble_alert_publisher_for_output_dict_key_string(self):
      """AlertPublisher - AlertPublisherRepository - assemble() - Dict with Key -> String"""
      self._alert.publishers = {
          "demisto": "tests.unit.streamalert.shared.test_publisher.SamplePublisher1",
          "pagerduty": [
              "tests.unit.streamalert.shared.test_publisher.SamplePublisher2"
          ],
      }
  
      publisher = _assemble_alert_publisher_for_output(
          self._alert, self._output, self._descriptor
      )
  
      assert_true(isinstance(publisher, CompositePublisher))
      assert_equal(len(publisher._publishers), 1)
      assert_true(
          isinstance(publisher._publishers[0], SamplePublisher1)
      )
  
imports: from mock import patch
  from nose.tools import assert_true, assert_equal, assert_false
  from streamalert.alert_processor.helpers import _assemble_alert_publisher_for_output
  from streamalert.shared.publisher import AlertPublisherRepository, AlertPublisher, CompositePublisher, DefaultPublisher, Register, WrappedFunctionPublisher
  from tests.unit.streamalert.alert_processor.helpers import get_alert
label_desc: Use image node_id 7 for calling the TestAlertPublisherRepositoryAssemblePublisher obj's underlying member method code with example usage: obj.test_assemble_alert_publisher_for_output_dict_key_string() without return types