Cleaning up template test syntax a bit
This commit is contained in:
parent
9aa8676bdd
commit
398b1d3e60
1 changed files with 12 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue