forked from orbit-oss/flask
add generate_template and generate_template_string functions
This commit is contained in:
parent
762382e436
commit
46433e9807
7 changed files with 139 additions and 37 deletions
|
|
@ -29,6 +29,15 @@ def test_original_win(app, client):
|
|||
assert rv.data == b"42"
|
||||
|
||||
|
||||
def test_simple_stream(app, client):
|
||||
@app.route("/")
|
||||
def index():
|
||||
return flask.stream_template_string("{{ config }}", config=42)
|
||||
|
||||
rv = client.get("/")
|
||||
assert rv.data == b"42"
|
||||
|
||||
|
||||
def test_request_less_rendering(app, app_ctx):
|
||||
app.config["WORLD_NAME"] = "Special World"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue