class_docstr: Test class for Teams
class_docstr_tok: ["Test","class","for","Teams"]
docstr: TeamsOutput - Dispatch Failure, Bad Request
docstr_tok: ["TeamsOutput","-","Dispatch","Failure",",","Bad","Request"]
code: def test_dispatch_failure(self, message_mock, log_mock):
      """TeamsOutput - Dispatch Failure, Bad Request"""
      exception = TeamsWebhookException("BOOM!")
  
      message_mock.return_value = Mock(send=Mock(side_effect=exception))
      assert_false(self._dispatcher.dispatch(get_alert(), self.OUTPUT))
  
      # Tests
      log_mock.assert_called()
      log_mock.assert_has_calls(
          [
              call("Error Sending Alert to Teams: %s", exception),
              call(
                  "Failed to send alert to %s:%s",
                  "teams",
                  "unit_test_channel",
              ),
          ]
      )
  
imports: import pymsteams
  from pymsteams import TeamsWebhookException
  from mock import MagicMock, Mock, patch, call
  from nose.tools import assert_equal, assert_false, assert_true
  from streamalert.alert_processor.helpers import compose_alert
  from streamalert.alert_processor.outputs.teams import TeamsOutput
  from tests.unit.streamalert.alert_processor.helpers import get_alert, get_random_alert
label_desc: Use image node_id 17 for calling the TestTeamsOutput obj's underlying member method code with example usage: obj.test_dispatch_failure(message_mock, log_mock) without return types