def config(): old_config = get_config() config = TestingConfig() set_config(config) yield config set_config(old_config)
from touchroute.web import flask_app, app_web_setup from touchroute.config import get_config current_config = get_config() _run_debug_server = __name__ == '__main__' _enable_debugging_features = _run_debug_server or current_config.DEBUG app_web_setup(flask_app, _enable_debugging_features) if _run_debug_server: flask_app.run(host='0.0.0.0', debug=True)
from touchroute.config import get_config current_config = get_config('Testing')