Merge varFind and varLookup

This commit is contained in:
Daniel Hokka Zakrisson 2012-10-20 22:34:31 +02:00
commit c9c5fc1456
2 changed files with 47 additions and 37 deletions

View file

@ -230,6 +230,14 @@ class TestUtils(unittest.TestCase):
res = ansible.utils.varReplace(template, vars, expand_lists=True)
assert res == 'yum pkg=foo,bar,baz state=installed'
def test_varReplace_escaped_var(self):
vars = {
'foo': 'bar',
}
template = 'action \$foo'
res = ansible.utils.varReplace(template, vars)
assert res == 'action $foo'
def test_template_varReplace_iterated(self):
template = 'hello $who'
vars = {