Cleaning up template test syntax a bit

pull/11093/head
James Cammarata 10 years ago
parent 9aa8676bdd
commit 398b1d3e60

@ -45,7 +45,18 @@ class TestTemplar(unittest.TestCase):
"/path/to/my_file.txt": "foo\n", "/path/to/my_file.txt": "foo\n",
}) })
shared_loader = SharedPluginLoaderObj() 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 # test some basic templating
self.assertEqual(templar.template("{{foo}}"), "bar") self.assertEqual(templar.template("{{foo}}"), "bar")

Loading…
Cancel
Save