def test_absent(self):
        name = 'test.example.com.'

        ret = {'name': name,
               'result': True,
               'changes': {},
               'comment': ''}

        mock = MagicMock(side_effect=[False, True])
        with patch.dict(boto_sns.__salt__,
                        {'boto_sns.exists': mock}):
            comt = ('AWS SNS topic {0} does not exist.'.format(name))
            ret.update({'comment': comt})
            self.assertDictEqual(boto_sns.absent(name), ret)

            with patch.dict(boto_sns.__opts__, {'test': True}):
                comt = ('AWS SNS topic {0} is set to be removed.'.format(name))
                ret.update({'comment': comt, 'result': None})
                self.assertDictEqual(boto_sns.absent(name), ret)
Test to ensure the named sns topic is deleted.
dataset/ETHPy150Open saltstack/salt/tests/unit/states/boto_sns_test.py/BotoSnsTestCase.test_absent