def test_list_pkgs_root(self): ''' Test if it list the packages currently installed in a dict, called with root parameter ''' mock = MagicMock(return_value='') with patch.dict(rpm.__salt__, {'cmd.run': mock}): rpm.list_pkgs(root='/') self.assertTrue(_called_with_root(mock))
def test_list_pkgs_root(self): """ Test if it list the packages currently installed in a dict, called with root parameter """ mock = MagicMock(return_value="") with patch.dict(rpm.__salt__, {"cmd.run": mock}): rpm.list_pkgs(root="/") self.assertTrue(_called_with_root(mock))
def test_list_pkgs(self): ''' Test if it list the packages currently installed in a dict ''' mock = MagicMock(return_value='') with patch.dict(rpm.__salt__, {'cmd.run': mock}): self.assertDictEqual(rpm.list_pkgs(), {})
def test_list_pkgs(self): """ Test if it list the packages currently installed in a dict """ mock = MagicMock(return_value="") with patch.dict(rpm.__salt__, {"cmd.run": mock}): self.assertDictEqual(rpm.list_pkgs(), {})
def test_list_pkgs(): """ Test if it list the packages currently installed in a dict """ mock = MagicMock(return_value="") with patch.dict(rpm.__salt__, {"cmd.run": mock}): assert rpm.list_pkgs() == {} assert not _called_with_root(mock)