Started working on refactoring Jinja integration

This commit is contained in:
Armin Ronacher 2010-07-04 11:16:24 +02:00
parent a154c87cfc
commit 7599046d04
5 changed files with 54 additions and 8 deletions

View file

@ -461,6 +461,14 @@ class TemplatingTestCase(unittest.TestCase):
'<p>Hello World!'
]
def test_no_escaping(self):
app = flask.Flask(__name__)
with app.test_request_context():
assert flask.render_template_string('{{ foo }}',
foo='<test>') == '<test>'
assert flask.render_template('mail.txt', foo='<test>') \
== '<test> Mail'
def test_macros(self):
app = flask.Flask(__name__)
with app.test_request_context():

1
tests/templates/mail.txt Normal file
View file

@ -0,0 +1 @@
{{ foo}} Mail