~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/tests/test_templating.py

  • Committer: Robert Collins
  • Date: 2012-02-02 05:07:53 UTC
  • mfrom: (464.1.1 mod-wsgi)
  • Revision ID: robertc@robertcollins.net-20120202050753-2d8f8r6m24lglbz5
    - Add a script and documentation for running under mod_wsgi.
      (Stuart Colville, Toshio Kuratomi)

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\
 
4
<body>\n<div>Hello, %s</div>\n</body>\n</html>"
 
5
 
 
6
 
 
7
def test_template_lookup():
 
8
    template = load_template("loggerhead.tests.simple")
 
9
    assert template
 
10
    TITLE="test"
 
11
    NAME="World"
 
12
    info = dict(title=TITLE, name=NAME)
 
13
    s = template.expand(**info)
 
14
    assert s.startswith(RENDERED % (TITLE, NAME))