class_docstr: Tests for shared/rule_table.py
docstr: Rule Table - Toggle Staging, ClientError Occurred
docstr_tok: ["Rule","Table","-","Toggle","Staging",",","ClientError","Occurred"]
code: def test_toggle_staged_state_error(self):
      """Rule Table - Toggle Staging, ClientError Occurred"""
      rule_name = "test_rule"
      self._create_db_rule_with_name(rule_name, True)
      with patch.object(
          self.rule_table._table,
          "update_item",
          side_effect=ClientError(
              {"Error": {"Code": "TEST"}}, "UpdateItem"
          ),
      ):
          assert_raises(
              ClientError,
              self.rule_table.toggle_staged_state,
              rule_name,
              True,
          )
  
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 25 for calling the TestRuleTable obj's underlying member method code with example usage: obj.test_toggle_staged_state_error() without return types