aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/tools.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-06-05 10:33:59 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-06-05 10:33:59 -0500
commit0a791a94de138f1a80989f46856bfd2ccd56e1c7 (patch)
treebae7e9c1fc5fcfb234d5c16f566046d2ce5df7ba /mediagoblin/tests/tools.py
parent67e8c45d2acba1b58ec2b69a367c3b10d0758c51 (diff)
downloadmediagoblin-0a791a94de138f1a80989f46856bfd2ccd56e1c7.tar.lz
mediagoblin-0a791a94de138f1a80989f46856bfd2ccd56e1c7.tar.xz
mediagoblin-0a791a94de138f1a80989f46856bfd2ccd56e1c7.zip
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?
Diffstat (limited to 'mediagoblin/tests/tools.py')
-rw-r--r--mediagoblin/tests/tools.py7
1 files 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)