Skip to content
Myr

test no debug flag doesn't reconfigure

Before adoption: this commit came in with the history the project adopted, so no landing records it.

test templates_auto_reload property instead of config use app fixture in test

authored by David Lord · committed by David Lord · parent 4fc4820 · Browse files · 1 file+7 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−7 removed

  • tests:+7 added−7 removed

1 file+7 added−7 removed

modified:tests/test_templating.py+7 added-7 removed
384 unmodified lines
385 app.config['DEBUG'] = True386 app.config['TEMPLATES_AUTO_RELOAD'] = True387 assert app.jinja_env.auto_reload is True388389def test_templates_auto_reload_debug_run(monkeypatch):390 # debug is None in config, config option is None, app.run(debug=True)391 # Mocks werkzeug.serving.run_simple method389def test_templates_auto_reload_debug_run(app, monkeypatch):390 def run_simple_mock(*args, **kwargs):391 pass392395 app = flask.Flask(__name__)393 monkeypatch.setattr(werkzeug.serving, 'run_simple', run_simple_mock)394398 assert app.config['TEMPLATES_AUTO_RELOAD'] is None399 assert app.jinja_env.auto_reload is False395 app.run()396 assert app.templates_auto_reload == False397 assert app.jinja_env.auto_reload == False398399 app.run(debug=True)400 assert app.templates_auto_reload == True401 assert app.jinja_env.auto_reload is True401 assert app.jinja_env.auto_reload == True402403404def test_template_loader_debugging(test_apps):405 from blueprintapp import app
44 unmodified lines