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?
This commit is contained in:
parent
67e8c45d2a
commit
0a791a94de
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user