def test_absent(self):
        name = 'web01'

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

        mock = MagicMock(side_effect=[False, True, True])
        mock_des = MagicMock(return_value={'state': True})
        with patch.dict(lxc.__salt__, {'lxc.exists': mock,
                                       'lxc.destroy': mock_des}):
            comt = ('Container \'{0}\' does not exist'.format(name))
            ret.update({'comment': comt})
            self.assertDictEqual(lxc.absent(name), ret)

            with patch.dict(lxc.__opts__, {'test': True}):
                comt = ('Container \'{0}\' would be destroyed'.format(name))
                ret.update({'comment': comt, 'result': None})
                self.assertDictEqual(lxc.absent(name), ret)

            with patch.dict(lxc.__opts__, {'test': False}):
                comt = ('Container \'{0}\' was destroyed'.format(name))
                ret.update({'comment': comt, 'result': True,
                            'changes': {'state': True}})
                self.assertDictEqual(lxc.absent(name), ret)

    # 'running' function tests: 1
For generating car, cdr, caar, cadr, etc...
dataset/ETHPy150Open saltstack/salt/tests/unit/states/lxc_test.py/LxcTestCase.test_absent--crossover with--dataset/ETHPy150Open samth/pycket/pycket/prims/general.py/make_list_eater