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