<commit_before># coding: utf-8
'''
Integration tests for renderer functions
'''

# Import Python Libs
from __future__ import absolute_import, unicode_literals, print_function

# Import Salt Testing libs
from tests.support.case import ModuleCase


class TestJinjaRenderer(ModuleCase):
    '''
    Validate that ordering works correctly
    '''
    def test_dot_notation(self):
        '''
        Test the Jinja dot-notation syntax for calling execution modules
        '''
        ret = self.run_function('state.sls', ['jinja_dot_notation'])
        for state_ret in ret.values():
            self.assertTrue(state_ret['result'])

    def test_salt_contains_function(self):
        '''
        Test if we are able to check if a function exists inside the "salt"
        wrapper (AliasLoader) which is available on Jinja templates.
        '''
        ret = self.run_function('state.sls', ['jinja_salt_contains_function'])
        for state_ret in ret.values():
            self.assertTrue(state_ret['result'])
<commit_msg>Mark renderer test as flaky for mac tests<commit_after># coding: utf-8
'''
Integration tests for renderer functions
'''

# Import Python Libs
from __future__ import absolute_import, unicode_literals, print_function

# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.helpers import flaky


class TestJinjaRenderer(ModuleCase):
    '''
    Validate that ordering works correctly
    '''
    def test_dot_notation(self):
        '''
        Test the Jinja dot-notation syntax for calling execution modules
        '''
        ret = self.run_function('state.sls', ['jinja_dot_notation'])
        for state_ret in ret.values():
            self.assertTrue(state_ret['result'])

    @flaky
    def test_salt_contains_function(self):
        '''
        Test if we are able to check if a function exists inside the "salt"
        wrapper (AliasLoader) which is available on Jinja templates.
        '''
        ret = self.run_function('state.sls', ['jinja_salt_contains_function'])
        for state_ret in ret.values():
            self.assertTrue(state_ret['result'])

{'fraction_non_alphanumeric': 0.09279321714554875, 'fraction_numerical': 0.0009420631182289214, 'mean_word_length': 3.1728880157170924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2968086', 'n_tokens_mistral': 587, 'n_tokens_neox': 573, 'n_words': 178}