~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/tests/test_templating.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2008-04-06 22:39:49 UTC
  • mfrom: (153.1.1 annotate-fix)
  • Revision ID: launchpad@pqm.canonical.com-20080406223949-q56j4n2qffm4b7p0
[r=mwh] Fix a typo in annotate.kid.

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))