mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
29 lines
691 B
Python
29 lines
691 B
Python
|
from pywb.webapp.pywb_init import create_wb_router
|
||
|
from pywb.framework.wsgi_wrappers import init_app
|
||
|
from webtest import TestApp
|
||
|
|
||
|
app = None
|
||
|
testapp = None
|
||
|
|
||
|
def make_app(config_file, pywb_router=create_wb_router):
|
||
|
app = init_app(pywb_router,
|
||
|
load_yaml=True,
|
||
|
config_file=config_file)
|
||
|
|
||
|
testapp = TestApp(app)
|
||
|
|
||
|
return app, testapp
|
||
|
|
||
|
def make_setup_module(config, pywb_router=create_wb_router):
|
||
|
def setup_module():
|
||
|
global app
|
||
|
global testapp
|
||
|
app, testapp = make_app(config, pywb_router)
|
||
|
|
||
|
return setup_module
|
||
|
|
||
|
class BaseIntegration(object):
|
||
|
def setup(self):
|
||
|
self.app = app
|
||
|
self.testapp = testapp
|