class_docstr: Tests for shared/rule_table.py
docstr: Rule Table - DynamoDB Record, Existing Database
docstr_tok: ["Rule","Table","-","DynamoDB","Record",",","Existing","Database"]
code: def test_dynamo_record(self, window_mock):
      """Rule Table - DynamoDB Record, Existing Database"""
      window_mock.return_value = ("staged-at-date", "staged-until-date")
      expected_record = {
          "RuleName": "foo_rule",
          "Staged": True,
          "StagedAt": "staged-at-date",
          "StagedUntil": "staged-until-date",
      }
  
      record = self.rule_table._dynamo_record("foo_rule", False)
      assert_equal(record, expected_record)
  
imports: from datetime import datetime
  import os
  from io import StringIO
  from botocore.exceptions import ClientError
  from mock import Mock, patch
  from moto import mock_dynamodb2
  from nose.tools import assert_equal, assert_not_equal, assert_raises
  from streamalert.shared import rule, rule_table
  from tests.unit.helpers.aws_mocks import setup_mock_rules_table
label_desc: Use image node_id 17 for calling the TestRuleTable obj's underlying member method code with example usage: obj.test_dynamo_record(window_mock) without return types