/usr/share/pyshared/wsgi_intercept/test/test_webtest.py is in python-wsgi-intercept 0.4-0ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #! /usr/bin/env python
import sys
import wsgi_intercept
from wsgi_intercept import test_wsgi_app, webtest_intercept
class WSGI_Test(webtest_intercept.WebCase):
HTTP_CONN = wsgi_intercept.WSGI_HTTPConnection
HOST = 'some_hopefully_nonexistant_domain'
def setUp(self):
wsgi_intercept.add_wsgi_intercept(self.HOST, self.PORT,
test_wsgi_app.create_fn)
def tearDown(self):
wsgi_intercept.remove_wsgi_intercept()
def test_page(self):
self.getPage('http://%s:%s/' % (self.HOST, self.PORT))
assert test_wsgi_app.success()
class WSGI_HTTPS_Test(webtest_intercept.WebCase):
HTTP_CONN = wsgi_intercept.WSGI_HTTPConnection
HOST = 'some_hopefully_nonexistant_domain'
def setUp(self):
wsgi_intercept.add_wsgi_intercept(self.HOST, self.PORT,
test_wsgi_app.create_fn)
def tearDown(self):
wsgi_intercept.remove_wsgi_intercept()
def test_page(self):
self.getPage('https://%s:%s/' % (self.HOST, self.PORT))
assert test_wsgi_app.success()
if __name__ == '__main__':
webtest.main()
|