~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-06-10 16:58:38 UTC
  • mfrom: (156.1.7 fix_deprecated_methods)
  • Revision ID: launchpad@pqm.canonical.com-20080610165838-0hdfo2tkh0xxgi25
[r=mwhudson] Changes from Martin Albisetti to remove dependence on
        deprecated-in-1.5-and-gone-in-1.6 bzrlib methods

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