mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
likewise in test_render_with_utf8_syntax_error()
This commit is contained in:
parent
4b34b60623
commit
8669dacaf1
@ -398,6 +398,8 @@ class TestGetTemplate(TestCase):
|
||||
__builtins__.__salt_system_encoding__ = encoding
|
||||
|
||||
def test_render_with_utf8_syntax_error(self):
|
||||
encoding = __builtins__.__salt_system_encoding__
|
||||
__builtins__.__salt_system_encoding__ = 'utf-8'
|
||||
template = 'hello\n\n{{ bad\n\nfoo\xed\x95\x9c'
|
||||
expected = r'.*---\nhello\n\n{{ bad\n\nfoo\xed\x95\x9c <======================\n---'
|
||||
self.assertRaisesRegexp(
|
||||
@ -407,6 +409,7 @@ class TestGetTemplate(TestCase):
|
||||
template,
|
||||
dict(opts=self.local_opts, saltenv='test')
|
||||
)
|
||||
__builtins__.__salt_system_encoding__ = encoding
|
||||
|
||||
def test_render_with_undefined_variable(self):
|
||||
template = "hello\n\n{{ foo }}\n\nfoo"
|
||||
|
Loading…
Reference in New Issue
Block a user