1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

tests: add integration tests for $liveweb rewrite handler and replay

with fallback
This commit is contained in:
Ilya Kreymer 2014-07-20 18:25:47 -07:00
parent 49deb501a6
commit e4297ddabe
2 changed files with 16 additions and 0 deletions

View File

@ -30,6 +30,14 @@ collections:
index_paths: './sample_archive/non-surt-cdx/'
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)/
# SURT keys are recommended for future indices, but non-SURT cdxs

View File

@ -259,6 +259,14 @@ class TestWb:
resp = self.testapp.get('/pywb/20140603030351mp_/http://example.com?example=3', status = 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):
resp = self.testapp.post('/pywb/mp_/httpbin.org/post', {'foo': 'bar', 'test': 'abc'})