likewise in test_render_with_utf8_syntax_error()

This commit is contained in:
Michael Steed 2015-06-09 11:48:13 -06:00
parent 4b34b60623
commit 8669dacaf1

View File

@ -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"