mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
26 lines
685 B
Python
26 lines
685 B
Python
|
import os
|
||
|
import pytest
|
||
|
|
||
|
import yaml
|
||
|
|
||
|
@pytest.fixture
|
||
|
def testconfig():
|
||
|
config = yaml.load(open('test_config.yaml'))
|
||
|
assert config
|
||
|
if 'index_paths' not in config:
|
||
|
# !!! assumes this module is in a sub-directory of project root.
|
||
|
config['index_paths'] = os.path.join(
|
||
|
os.path.dirname(os.path.realpath(__file__)),
|
||
|
'../sample_archive/cdx')
|
||
|
return config
|
||
|
|
||
|
#================================================================
|
||
|
# Reporter callback for replay view
|
||
|
class PrintReporter:
|
||
|
"""Reporter callback for replay view.
|
||
|
"""
|
||
|
def __call__(self, wbrequest, cdx, response):
|
||
|
print wbrequest
|
||
|
print cdx
|
||
|
pass
|