def test_absent(self):
        name = 'jboss'

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

        with patch.dict(at.__opts__, {'test': True}):
            ret.update({'comment': 'Remove jobs()'})
            self.assertDictEqual(at.absent(name), ret)

        with patch.dict(at.__opts__, {'test': False}):
            comt = 'limit parameter not supported {0}'.format(name)
            ret.update({'comment': comt, 'result': False})
            self.assertDictEqual(at.absent(name), ret)

            mock = MagicMock(return_value={'jobs': []})
            mock_bool = MagicMock(return_value=False)
            with patch.dict(at.__salt__, {'at.atq': mock,
                                          'cmd.run': mock_bool}):
                comt = 'No match jobs or time format error'
                ret.update({'comment': comt, 'result': False, 'name': 'all'})
                self.assertDictEqual(at.absent('all'), ret)

            mock = MagicMock(return_value={'jobs': [{'job': 'rose'}]})
            mock_bool = MagicMock(return_value=False)
            with patch.dict(at.__salt__, {'at.atq': mock,
                                          'cmd.run': mock_bool}):
                comt = "Remove job(rose) from queue but (['rose']) fail"
                ret.update({'comment': comt, 'result': True})
                self.assertDictEqual(at.absent('all'), ret)
Find all L{LoggedMessage} of the specified type.
dataset/ETHPy150Open saltstack/salt/tests/unit/states/at_test.py/AtTestCase.test_absent--crossover with--dataset/ETHPy150Open ClusterHQ/eliot/eliot/testing.py/LoggedMessage.ofType