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

add wsgi_cdxserver_test for testing cdx server app example

pywb.cdx.wsgi_cdxserver
This commit is contained in:
Ilya Kreymer 2014-02-17 13:59:57 -08:00
parent abea504b04
commit 158b490453

View 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