class_docstr: Tests for shared/alert_table.py
docstr: Alert Table - Mark As Dispatched
docstr_tok: ["Alert","Table","-","Mark","As","Dispatched"]
code: def test_mark_as_dispatched(self):
      """Alert Table - Mark As Dispatched"""
      alert = self.alerts[1]
      alert.attempts = 1
      alert.dispatched = datetime.utcnow()
      self.alert_table.mark_as_dispatched(alert)
  
      # Verify that there is now 1 attempt
      result = self.alert_table.get_alert_record(
          alert.rule_name, alert.alert_id
      )
      assert_equal(1, result["Attempts"])
  
imports: from datetime import datetime
  import os
  from botocore.exceptions import ClientError
  from mock import ANY, MagicMock, patch
  from moto import mock_dynamodb2
  from nose.tools import assert_equal, assert_raises
  from streamalert.shared import alert, alert_table
  from tests.unit.helpers.aws_mocks import setup_mock_alerts_table
label_desc: Use image node_id 9 for calling the TestAlertTable obj's underlying member method code with example usage: obj.test_mark_as_dispatched() without return types