mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
tests: add integration tests for $liveweb rewrite handler and replay
with fallback
This commit is contained in:
parent
49deb501a6
commit
e4297ddabe
@ -30,6 +30,14 @@ collections:
|
|||||||
index_paths: './sample_archive/non-surt-cdx/'
|
index_paths: './sample_archive/non-surt-cdx/'
|
||||||
surt_ordered: false
|
surt_ordered: false
|
||||||
|
|
||||||
|
# live collection
|
||||||
|
live: $liveweb
|
||||||
|
|
||||||
|
# coll with fallback
|
||||||
|
pywb-fallback:
|
||||||
|
index_paths: ./sample_archive/cdx/
|
||||||
|
fallback: live
|
||||||
|
|
||||||
|
|
||||||
# indicate if cdx files are sorted by SURT keys -- eg: com,example)/
|
# indicate if cdx files are sorted by SURT keys -- eg: com,example)/
|
||||||
# SURT keys are recommended for future indices, but non-SURT cdxs
|
# SURT keys are recommended for future indices, but non-SURT cdxs
|
||||||
|
@ -259,6 +259,14 @@ class TestWb:
|
|||||||
resp = self.testapp.get('/pywb/20140603030351mp_/http://example.com?example=3', status = 503)
|
resp = self.testapp.get('/pywb/20140603030351mp_/http://example.com?example=3', status = 503)
|
||||||
assert resp.status_int == 503
|
assert resp.status_int == 503
|
||||||
|
|
||||||
|
def test_live_frame(self):
|
||||||
|
resp = self.testapp.get('/live/mp_/http://example.com/?test=test')
|
||||||
|
assert resp.status_int == 200
|
||||||
|
|
||||||
|
def test_live_fallback(self):
|
||||||
|
resp = self.testapp.get('/pywb-fallback/mp_/http://example.com/?test=test')
|
||||||
|
assert resp.status_int == 200
|
||||||
|
|
||||||
def test_post_1(self):
|
def test_post_1(self):
|
||||||
resp = self.testapp.post('/pywb/mp_/httpbin.org/post', {'foo': 'bar', 'test': 'abc'})
|
resp = self.testapp.post('/pywb/mp_/httpbin.org/post', {'foo': 'bar', 'test': 'abc'})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user