How to use the kas.includehandler.load_config function in kas

To help you get started, we’ve selected a few kas 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 siemens / kas / tests / test_includehandler.py View on Github external
def test_err_invalid_ext(self):
        # Test for invalid file extension:
        exception = includehandler.LoadConfigException
        with pytest.raises(exception):
            includehandler.load_config('x.xyz')
github siemens / kas / tests / test_includehandler.py View on Github external
def util_exception_content(self, testvector):
        for string, exception in testvector:
            with patch_open(includehandler, string=string):
                with pytest.raises(exception):
                    includehandler.load_config('x.yml')
github siemens / kas / tests / test_includehandler.py View on Github external
def test_compat_version(self, monkeypatch):
        monkeypatch.setattr(includehandler, '__compatible_file_version__', 1)
        with patch_open(includehandler, string='header: {version: "0.10"}'):
            includehandler.load_config('x.yml')
github siemens / kas / tests / test_includehandler.py View on Github external
def test_header_valid(self):
        testvector = [
            'header: {version: 4}',
            'header: {version: 5}',
        ]
        for string in testvector:
            with patch_open(includehandler, string=string):
                includehandler.load_config('x.yml')