forked from orbit-oss/flask
Added support for macro pulling and documented certain design decisions.
This commit is contained in:
parent
ab54924186
commit
190059c8f0
6 changed files with 187 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue