def test_unpurge(self): ''' Test if it change package selection for each package specified to 'install' ''' mock = MagicMock(return_value=[]) with patch.dict(dpkg.__salt__, {'pkg.list_pkgs': mock, 'cmd.run': mock}): self.assertDictEqual(dpkg.unpurge('curl'), {})
def test_unpurge_empty_package(self): ''' Test if it change package selection for each package specified to 'install' ''' self.assertDictEqual(dpkg.unpurge(), {})