Added support for macro pulling and documented certain design decisions.

This commit is contained in:
Armin Ronacher 2010-04-18 15:44:06 +02:00
parent ab54924186
commit 190059c8f0
6 changed files with 187 additions and 1 deletions

View file

@ -197,6 +197,12 @@ class Templating(unittest.TestCase):
'<p>Hello World!'
]
def test_macros(self):
app = flask.Flask(__name__)
with app.test_request_context():
macro = flask.get_template_attribute('_macro.html', 'hello')
assert macro('World') == 'Hello World!'
if __name__ == '__main__':
unittest.main()