Browse Source

Fixed tests

sh4nks 11 years ago
parent
commit
58a8e2f2e5
1 changed files with 3 additions and 2 deletions
  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):