Cleaning up template test syntax a bit

This commit is contained in:
James Cammarata 2015-05-17 01:13:22 -05:00
parent 9aa8676bdd
commit 398b1d3e60

View file

@ -45,7 +45,18 @@ class TestTemplar(unittest.TestCase):
"/path/to/my_file.txt": "foo\n",
})
shared_loader = SharedPluginLoaderObj()
templar = Templar(loader=fake_loader, variables=dict(foo="bar", bam="{{foo}}", num=1, var_true=True, var_false=False, var_dict=dict(a="b"), bad_dict="{a='b'", var_list=[1], recursive="{{recursive}}"))
variables = dict(
foo="bar",
bam="{{foo}}",
num=1,
var_true=True,
var_false=False,
var_dict=dict(a="b"),
bad_dict="{a='b'",
var_list=[1],
recursive="{{recursive}}",
)
templar = Templar(loader=fake_loader, variables=variables)
# test some basic templating
self.assertEqual(templar.template("{{foo}}"), "bar")