コード例 #1
0
ファイル: test_rewriter.py プロジェクト: mirrorweb/pywb
    def setup_class(cls):
        super(TestRewriterApp, cls).setup_class()

        #cls.app = RWApp.create_app(replay_port=cls.server.port)
        #cls.testapp = webtest.TestApp(cls.app.app)
        cls.testapp = webtest.TestApp(
            FrontEndApp(custom_config=LIVE_CONFIG, config_file=None))
コード例 #2
0
ファイル: cli.py プロジェクト: thebeatlecpu2012/PyDodge
    def load(self):
        from pywb.apps.frontendapp import FrontEndApp

        self.r.live = True

        super(LiveCli, self).load()
        return FrontEndApp(config_file=None, custom_config=self.extra_config)
コード例 #3
0
ファイル: test_proxy.py プロジェクト: yvmarques/pywb
    def setup_class(cls,
                    coll='pywb',
                    config_file='config_test.yaml',
                    recording=False,
                    proxy_opts={},
                    config_opts={}):

        super(BaseTestProxy, cls).setup_class()
        config_file = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                                   config_file)

        cls.root_ca_file = os.path.join(cls.root_dir, 'pywb-ca-test.pem')

        opts = {
            'ca_name': 'pywb test HTTPS Proxy CA',
            'ca_file_cache': cls.root_ca_file,
            'coll': coll,
            'recording': recording,
        }

        opts.update(proxy_opts)

        custom_config = config_opts
        custom_config['proxy'] = opts

        cls.app = FrontEndApp(config_file=config_file,
                              custom_config=custom_config)

        cls.server = GeventServer(cls.app, handler_class=RequestURIWSGIHandler)
        cls.proxies = cls.proxy_dict(cls.server.port)
コード例 #4
0
    def replay_url(self, url=None):
        application = FrontEndApp(
            config_file='config/config.yaml',
            custom_config={
                'debug': True,
                'framed_replay': False})

        client = Client(application, BaseResponse)
        return client.get(self.get_replay_url(url=url), follow_redirects=True)
コード例 #5
0
    def setup_class(cls,
                    coll='pywb',
                    config_file='config_test.yaml',
                    recording=False):
        super(BaseTestProxy, cls).setup_class()
        config_file = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                                   config_file)

        cls.root_ca_file = os.path.join(cls.root_dir, 'pywb-ca-test.pem')

        opts = {
            'ca_name': 'pywb test HTTPS Proxy CA',
            'ca_file_cache': cls.root_ca_file,
            'coll': coll,
            'recording': recording,
        }

        cls.app = FrontEndApp(config_file=config_file,
                              custom_config={'proxy': opts})

        cls.server = GeventServer(cls.app)
        cls.proxies = cls.proxy_dict(cls.server.port)
コード例 #6
0
from gevent.monkey import patch_all
patch_all()
from pywb.apps.frontendapp import FrontEndApp

application = FrontEndApp(config_file=None,
                          custom_config={'collections': {
                              'live': '$live'
                          }})
コード例 #7
0
ファイル: wsgi.py プロジェクト: bensteinberg/WARC-diff-tools
import os
from werkzeug.wsgi import DispatcherMiddleware

from django.core.wsgi import get_wsgi_application
from django.conf import settings

from pywb.apps.frontendapp import FrontEndApp
from dashboard.handler import WSHandler
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")


application = DispatcherMiddleware(
    get_wsgi_application(),
    {
        '/websocket': WSHandler,
        settings.ARCHIVES_ROUTE: FrontEndApp(
            config_file='config/config.yaml',
            custom_config={'debug': True}),
    }
)
コード例 #8
0
ファイル: cli.py プロジェクト: thebeatlecpu2012/PyDodge
    def load(self):
        from pywb.apps.frontendapp import FrontEndApp

        super(WaybackCli, self).load()
        return FrontEndApp(custom_config=self.extra_config)
コード例 #9
0
 def get_test_app(cls, config_file, custom_config=None):
     config_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), config_file)
     app = FrontEndApp(config_file=config_file, custom_config=custom_config)
     return app, webtest.TestApp(app)
コード例 #10
0
ファイル: wayback.py プロジェクト: mirrorweb/pywb
from gevent.monkey import patch_all

patch_all()
from pywb.apps.frontendapp import FrontEndApp

application = FrontEndApp()