Commit 36d4fba9 authored by Julien Muchembled's avatar Julien Muchembled

jinja2: use new output/inline/url options in tests

parent 7fa2695a
......@@ -25,8 +25,8 @@ Example demonstrating some types::
...
... [template]
... recipe = slapos.recipe.template:jinja2
... template = foo.in
... rendered = foo
... url = foo.in
... output = foo
... context =
... key bar section:key
... key recipe :recipe
......@@ -100,8 +100,8 @@ rendering::
...
... [template]
... recipe = slapos.recipe.template:jinja2
... template = inline:dummy
... rendered = foo_once
... inline = dummy
... output = foo_once
... once = foo_flag
... ''')
>>> run_buildout()
......@@ -158,9 +158,9 @@ It's also possible to use the same file for ``rendered`` and ``once``::
...
... [template]
... recipe = slapos.recipe.template:jinja2
... template = inline:initial content
... rendered = rendered
... once = ${:rendered}
... inline = initial content
... output = rendered
... once = ${:output}
... ''')
>>> run_buildout() # doctest: +ELLIPSIS
Uninstalling template.
......@@ -175,7 +175,7 @@ Template was rendered::
When buildout options are modified, the template will not be rendered again::
>>> with open('buildout.cfg', 'a') as f:
... f.writelines(['template = inline:something different'])
... f.writelines(['inline = something different'])
>>> run_buildout()
Uninstalling template.
......@@ -223,8 +223,8 @@ will be installed as dependency::
...
... [template]
... recipe = slapos.recipe.template:jinja2
... template = inline:{{bar}}
... rendered = foo
... inline = {{bar}}
... output = foo
... context = key bar dependency:foobar
...
... [dependency]
......@@ -277,9 +277,9 @@ Let's just use ``buildout.cfg`` using this egg::
...
... [template]
... recipe = slapos.recipe.template:jinja2
... template = inline:
... inline =
... {{bar}}
... rendered = foo
... output = foo
... context = key bar sample:data
...
... [sample]
......@@ -314,8 +314,8 @@ whitespace-separated. By default, none is loaded.
...
... [template]
... recipe = slapos.recipe.template:jinja2
... template = foo.in
... rendered = foo
... url = foo.in
... output = foo
... context = key bar buildout:parts
... # We don't actually use all those extensions in this minimal example.
... extensions = jinja2.ext.do jinja2.ext.loopcontrols
......@@ -369,8 +369,8 @@ imported::
...
... [template]
... recipe = slapos.recipe.template:jinja2
... template = template.in
... rendered = bar
... url = template.in
... output = bar
... import-list = rawfile library library.in
... ''')
>>> run_buildout()
......@@ -390,8 +390,8 @@ Just like context definition, it also works with indirect values::
...
... [template]
... recipe = slapos.recipe.template:jinja2
... template = template.in
... rendered = bar
... url = template.in
... output = bar
... import-list = file library template-library:path
... ''')
>>> run_buildout()
......@@ -432,8 +432,8 @@ All templates can be accessed inside both folders::
...
... [template]
... recipe = slapos.recipe.template:jinja2
... template = template.in
... rendered = bar
... url = template.in
... output = bar
... import-list =
... rawfolder dir_a a
... rawfolder dir_b b
......@@ -469,8 +469,8 @@ path)::
...
... [template]
... recipe = slapos.recipe.template:jinja2
... template = template.in
... rendered = bar
... url = template.in
... output = bar
... import-delimiter = \
... import-list =
... rawfolder dir_a a
......@@ -517,8 +517,8 @@ Errors in template
...
... [template]
... recipe = slapos.recipe.template:jinja2
... template = template.in
... rendered = foo
... url = template.in
... output = foo
... ''')
>>> 0; run_buildout() # doctest: +ELLIPSIS
0...
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment