forked from orbit-oss/flask
Merge branch 'master' of github.com:pallets/flask into json_encode_non_utc_datetimes
This commit is contained in:
commit
5b38fe2fbe
4 changed files with 75 additions and 8 deletions
|
|
@ -14,6 +14,7 @@ import pytest
|
|||
import flask
|
||||
import logging
|
||||
from jinja2 import TemplateNotFound
|
||||
import werkzeug.serving
|
||||
|
||||
|
||||
def test_context_processing(app, client):
|
||||
|
|
@ -385,6 +386,20 @@ def test_templates_auto_reload(app):
|
|||
app.config['TEMPLATES_AUTO_RELOAD'] = True
|
||||
assert app.jinja_env.auto_reload is True
|
||||
|
||||
def test_templates_auto_reload_debug_run(app, monkeypatch):
|
||||
def run_simple_mock(*args, **kwargs):
|
||||
pass
|
||||
|
||||
monkeypatch.setattr(werkzeug.serving, 'run_simple', run_simple_mock)
|
||||
|
||||
app.run()
|
||||
assert app.templates_auto_reload == False
|
||||
assert app.jinja_env.auto_reload == False
|
||||
|
||||
app.run(debug=True)
|
||||
assert app.templates_auto_reload == True
|
||||
assert app.jinja_env.auto_reload == True
|
||||
|
||||
|
||||
def test_template_loader_debugging(test_apps):
|
||||
from blueprintapp import app
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue