~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/tests/test_templating.py

  • Committer: Guillermo Gonzalez
  • Date: 2008-08-22 16:07:30 UTC
  • mto: (217.1.9 logging)
  • mto: This revision was merged to the branch mainline in revision 226.
  • Revision ID: guillo.gonzo@gmail.com-20080822160730-tp6iqlotpxbieb1a
 * refactor of logging-related functions (setup_logging and make_handler) into (new) trace module

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