@mock.patch('st2common.logging.formatters.MASKED_ATTRIBUTES_BLACKLIST', MOCK_MASKED_ATTRIBUTES_BLACKLIST)
def test_format_rule(self):
    expected_result = {'description': 'Test description', 'tags': [], 'type': {'ref': 'standard', 'parameters': {}}, 'enabled': True, 'trigger': 'test tigger', 'metadata_file': None, 'context': {}, 'criteria': {}, 'action': {'ref': '1234', 'parameters': {'b': 2}}, 'uid': 'rule:testpack:test.action', 'pack': 'testpack', 'ref': 'testpack.test.action', 'id': None, 'name': 'test.action'}
    mock_rule_db = RuleDB(pack='testpack', name='test.action', description='Test description', trigger='test tigger', action={'ref': '1234', 'parameters': {'b': 2}})
    result = mock_rule_db.to_serializable_dict()
    self.assertEqual(expected_result, result)
@mock.patch('st2common.logging.formatters.MASKED_ATTRIBUTES_BLACKLIST', MOCK_MASKED_ATTRIBUTES_BLACKLIST)
def test_format_rule(self):
    expected_result = {'description': 'Test description', 'tags': [], 'type': {'ref': 'standard', 'parameters': {}}, 'enabled': True, 'trigger': 'test tigger', 'metadata_file': None, 'context': {}, 'criteria': {}, 'action': {'ref': '1234', 'parameters': {'b': 2}}, 'uid': 'rule:testpack:test.action', 'pack': 'testpack', 'ref': 'testpack.test.action', 'id': None, 'name': 'test.action'}
    mock_rule_db = RuleDB(pack='testpack', name='test.action', description='Test description', trigger='test tigger', action={'ref': '1234', 'parameters': {'b': 2}})
    result = mock_rule_db.to_serializable_dict()
    self.assertEqual(expected_result, result)