sh4nks 11 лет назад
Родитель
Сommit
58a8e2f2e5
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      flaskbb/app.py

+ 3 - 2
flaskbb/app.py

@@ -134,8 +134,9 @@ def configure_extensions(app):
 
 
 def update_settings_from_db(app):
-    with app.app_context():
-        app.config.update(Setting.as_dict(upper=True))
+    if not app.config["TESTING"]:
+        with app.app_context():
+            app.config.update(Setting.as_dict(upper=True))
 
 
 def configure_template_filters(app):