"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/Tools/turbocheetah/tests/test_template.py" between
cheetah3-3.1.0.tar.gz and cheetah3-3.2.0.tar.gz

About: Cheetah3 is a template engine and code generation tool for e.g. for Web development or Java, SQL, LaTeX, form email ... (written in Python).

test_template.py  (cheetah3-3.1.0):test_template.py  (cheetah3-3.2.0)
import os import os
from ..cheetahsupport import TurboCheetah from ..cheetahsupport import TurboCheetah
here = os.path.dirname(__file__) here = os.path.dirname(__file__)
values = { values = {
'v': 'VV', 'v': 'VV',
'one': 1, 'one': 1,
} }
def test_normal(): def test_normal():
plugin = TurboCheetah() plugin = TurboCheetah()
# Make sure a simple test works: # Make sure a simple test works:
s = plugin.render(values, template='turbocheetah.tests.simple1') s = plugin.render(values, template='turbocheetah.tests.simple1')
assert s.strip() == 'This is a test: VV' assert s.strip() == 'This is a test: VV'
# Make sure one template can inherit from another: # Make sure one template can inherit from another:
s = plugin.render(values, template='turbocheetah.tests.import_inherit') s = plugin.render(values, template='turbocheetah.tests.import_inherit')
assert s.strip() == 'Inherited: import' assert s.strip() == 'Inherited: import'
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)