def test_healthy(self): ''' Tests successful return of healthy function ''' ret = {} ret['stdout'] = "all pools are healthy" ret['stderr'] = "" ret['retcode'] = 0 mock_cmd = MagicMock(return_value=ret) with patch.dict(zpool.__salt__, {'cmd.run_all': mock_cmd}): self.assertTrue(zpool.healthy())
def test_healthy(self): """ Tests successful return of healthy function """ ret = {} ret["stdout"] = "all pools are healthy" ret["stderr"] = "" ret["retcode"] = 0 mock_cmd = MagicMock(return_value=ret) with patch.dict(zpool.__salt__, {"cmd.run_all": mock_cmd}), patch.dict( zpool.__utils__, self.utils_patch): self.assertTrue(zpool.healthy())