Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
d38bb415
Commit
d38bb415
authored
Aug 16, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed test to match new exception class used
parent
ee2e31b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
test/units/template/test_templar.py
+2
-4
No files found.
test/units/template/test_templar.py
View file @
d38bb415
...
...
@@ -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}}"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment