mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixed test to match new exception class used
This commit is contained in:
parent
ee2e31b37a
commit
d38bb4152d
1 changed files with 2 additions and 4 deletions
|
@ -19,8 +19,6 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from jinja2.exceptions import UndefinedError
|
||||
|
||||
from ansible.compat.tests import unittest
|
||||
from ansible.compat.tests.mock import patch, MagicMock
|
||||
|
||||
|
@ -75,8 +73,8 @@ class TestTemplar(unittest.TestCase):
|
|||
#self.assertEqual(templar.template("{{lookup('file', '/path/to/my_file.txt')}}"), "foo")
|
||||
|
||||
# force errors
|
||||
self.assertRaises(UndefinedError, templar.template, "{{bad_var}}")
|
||||
self.assertRaises(UndefinedError, templar.template, "{{lookup('file', bad_var)}}")
|
||||
self.assertRaises(AnsibloeUndefinedVariable, templar.template, "{{bad_var}}")
|
||||
self.assertRaises(AnsibleUndefinedVariable, templar.template, "{{lookup('file', bad_var)}}")
|
||||
self.assertRaises(AnsibleError, templar.template, "{{lookup('bad_lookup')}}")
|
||||
self.assertRaises(AnsibleError, templar.template, "{{recursive}}")
|
||||
self.assertRaises(AnsibleUndefinedVariable, templar.template, "{{foo-bar}}")
|
||||
|
|
Loading…
Reference in a new issue