mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
add wsgi_cdxserver_test for testing cdx server app example
pywb.cdx.wsgi_cdxserver
This commit is contained in:
parent
abea504b04
commit
158b490453
15
pywb/cdx/test/wsgi_cdxserver_test.py
Normal file
15
pywb/cdx/test/wsgi_cdxserver_test.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import webtest
|
||||||
|
from pywb.cdx.wsgi_cdxserver import main
|
||||||
|
from pywb import get_test_dir
|
||||||
|
|
||||||
|
class TestCdx:
|
||||||
|
def setup(self):
|
||||||
|
self.app = main(get_test_dir() + 'cdx/')
|
||||||
|
self.testapp = webtest.TestApp(self.app)
|
||||||
|
|
||||||
|
def test_cdx(self):
|
||||||
|
resp = self.testapp.get('/cdx?url=http://www.iana.org/_css/2013.1/screen.css')
|
||||||
|
assert resp.content_type == 'text/plain'
|
||||||
|
assert resp.content_length > 0
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user