How to use rend - 3 common examples

To help you get started, we’ve selected a few rend examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github saltstack / idem / tests / unit / View on Github external
def test_dup_keys():
    with pytest.raises(rend.exc.RenderException):
        ret = run_sls(['dupkeys'])
github saltstack / heist / tests / unit / roster / View on Github external
async def test_read_rend_exc(self, mock_hub: testing.MockHub):
        test when a rend.exc is raised
        # Setup
        roster = 'flat' = rend.exc.RenderException("Jinja error '}'")

        # Execute
        assert not await, roster)

        # Verify
github saltstack / heist / heist / roster / View on Github external
async def read(hub, roster: str) -> List[Dict[str, Any]]:
    Given the rosters to read in, the tgt and the tgt_type
    ret = []

        ready = await getattr(hub, f'roster.{roster}.read')()
    except rend.exc.RenderException as exc:
        log.critical(f'Could not render the {roster} roster, error: {exc.args[0]}')
        return False

    if not ready:
        log.critical(f'The roster {roster} did not return data when rendered')
        return False

    if not isinstance(ready, dict):
        log.critical(f'The roster {roster} is not formatted correctly')
        return False

    for id_, condition in ready.items():
        if not isinstance(condition, dict):
            log.critical(f'The roster {roster} is not formatted correctly.')
            return False
        if 'id' not in condition:


A collection of tools to render text files into data structures

Latest version published 10 months ago

Package Health Score

56 / 100
Full package analysis

Popular rend functions