summaryrefslogtreecommitdiff
path: root/cherrypy/test/test_wsgi_vhost.py
diff options
context:
space:
mode:
Diffstat (limited to 'cherrypy/test/test_wsgi_vhost.py')
-rw-r--r--cherrypy/test/test_wsgi_vhost.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/cherrypy/test/test_wsgi_vhost.py b/cherrypy/test/test_wsgi_vhost.py
index a36a936c..2b6e5ba9 100644
--- a/cherrypy/test/test_wsgi_vhost.py
+++ b/cherrypy/test/test_wsgi_vhost.py
@@ -4,6 +4,7 @@ from cherrypy.test import helper
class WSGI_VirtualHost_Test(helper.CPWebCase):
+ @staticmethod
def setup_server():
class ClassOfRoot(object):
@@ -11,9 +12,9 @@ class WSGI_VirtualHost_Test(helper.CPWebCase):
def __init__(self, name):
self.name = name
+ @cherrypy.expose
def index(self):
- return "Welcome to the %s website!" % self.name
- index.exposed = True
+ return 'Welcome to the %s website!' % self.name
default = cherrypy.Application(None)
@@ -23,13 +24,12 @@ class WSGI_VirtualHost_Test(helper.CPWebCase):
domains['www.classof%s.example' % year] = app
cherrypy.tree.graft(cherrypy._cpwsgi.VirtualHost(default, domains))
- setup_server = staticmethod(setup_server)
def test_welcome(self):
if not cherrypy.server.using_wsgi:
- return self.skip("skipped (not using WSGI)... ")
+ return self.skip('skipped (not using WSGI)... ')
for year in range(1997, 2008):
self.getPage(
- "/", headers=[('Host', 'www.classof%s.example' % year)])
- self.assertBody("Welcome to the Class of %s website!" % year)
+ '/', headers=[('Host', 'www.classof%s.example' % year)])
+ self.assertBody('Welcome to the Class of %s website!' % year)