~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/tests/test_templating.py

  • Committer: Martin Albisetti
  • Date: 2008-08-14 20:31:07 UTC
  • Revision ID: argentina@gmail.com-20080814203107-lh3ri4bd82stp20j
Make sure that results haven't been superseded while to type. Bug #248018

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from loggerhead.zptsupport import load_template
 
2
 
 
3
RENDERED = u"<html>\n<head>\n<title>%s</title>\n</head>\n<body>\n<div>Hello, %s</div>\n</body>\n</html>"
 
4
 
 
5
def test_template_lookup():
 
6
    template = load_template("loggerhead.tests.simple")
 
7
    assert template
 
8
    TITLE="test"
 
9
    NAME="World"
 
10
    info = dict(title=TITLE, name=NAME)
 
11
    s = template.expand(**info)
 
12
    assert s.startswith(RENDERED % (TITLE, NAME))