def test_present_when_topic_rule_does_not_exist(self):
        self.conn.get_topic_rule.side_effect = [topic_rule_not_found_error, {'rule': topic_rule_ret}]
        self.conn.create_topic_rule.return_value = {'created': True}
        result = salt_states['boto_iot.topic_rule_present'](
                         'topic rule present',
                         ruleName=topic_rule_ret['ruleName'],
                         sql=topic_rule_ret['sql'],
                         description=topic_rule_ret['description'],
                         actions=topic_rule_ret['actions'],
                         ruleDisabled=topic_rule_ret['ruleDisabled'])

        self.assertTrue(result['result'])
        self.assertEqual(result['changes']['new']['rule']['ruleName'],
                         topic_rule_ret['ruleName'])
Tests present on a topic_rule that does not exist.
dataset/ETHPy150Open saltstack/salt/tests/unit/states/boto_iot_test.py/BotoIoTTopicRuleTestCase.test_present_when_topic_rule_does_not_exist