From 0a791a94de138f1a80989f46856bfd2ccd56e1c7 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 5 Jun 2011 10:33:59 -0500 Subject: [PATCH] Actually it's a lot better of an idea to load the full application out of the paste config file the way paste would than to load components of it ourselves. Aside from this being nicer, it's also necessary for the sake of getting the middleware working nicely. We could do it ourselves, but why bother when paste can just do it for us? --- mediagoblin/tests/tools.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mediagoblin/tests/tools.py b/mediagoblin/tests/tools.py index 70b74b89..a51402e9 100644 --- a/mediagoblin/tests/tools.py +++ b/mediagoblin/tests/tools.py @@ -18,10 +18,9 @@ import pkg_resources import os, shutil -from paste.deploy import appconfig +from paste.deploy import appconfig, loadapp from webtest import TestApp -from mediagoblin import app from mediagoblin.db.open import setup_connection_and_db_from_config @@ -88,7 +87,7 @@ def get_test_app(dump_old_app=True): # TODO: Drop and recreate indexes # setup app and return - test_app = app.paste_app_factory( - config.global_conf, **config.local_conf) + test_app = loadapp( + 'config:' + TEST_APP_CONFIG) return TestApp(test_app) -- 2.25.1