class_docstr: Test class for Teams
class_docstr_tok: ["Test","class","for","Teams"]
docstr: TeamsOutput - _generate_alert_section - Teams
docstr_tok: ["TeamsOutput","-","_generate_alert_section","-","Teams"]
code: def test_generate_alert_section(self, section_mock):
      """TeamsOutput - _generate_alert_section - Teams"""
      section_mock.return_value = Mock(
          activityTitle=Mock(), addFact=Mock()
      )
  
      rule_name = "test_rule_default"
      alert = get_random_alert(25, rule_name)
  
      section = self._dispatcher._generate_alert_section(alert)
  
      # Tests
      section_mock.assert_called()
      section.activityTitle.assert_called()
      section.activityTitle.assert_called_with("Alert Info")
      section.addFact.assert_called()
      section.addFact.assert_has_calls(
          [
              call("rule_name", alert.rule_name),
              call("alert_id", alert.alert_id),
          ],
          any_order=False,
      )
  
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 3 for calling the TestTeamsOutput obj's underlying member method code with example usage: obj.test_generate_alert_section(section_mock) without return types