On Jan 13, 2008 11:17 PM, Robert MannI <[EMAIL PROTECTED]> wrote: > Hi! Titus recommended me this mailing list, mentioning K. McMillan's > name as a helpful resource. > > I am trying to run twill on cherrypy3. > > > The examples in http://ivory.idyll.org/articles/twill-and-wsgi_intercept.html > seem to be for 2x versions of cherrypy, and as I have learned by > now, cherrypy 3 seems to introduce many changes in the codebase. > > > > Specifically, the following marked line is giving me problems, > cherryPy3 doesn't seem to be accepting initOnly and server class > parameters anymore: > > <code> > > import cherrypy > > from cherrypy.tutorial.tut01_helloworld import HelloWorld > > > > # set up the root object > > cherrypy.root = HelloWorld() > > > > # initialize > > cherrypy.server.start(initOnly=True, serverClass=None) > > <---------- right here
what happens if you change it to simply: cherrypy.server.start() ? If that doesn't work, you may need to consult the cherrypy docs for the correct way to start a server for testing. > > > > # get WSGI app. > > from cherrypy._cpwsgi import wsgiApp > > </code> > > > How could I get this to work under cherrypy3? > > > > Also, why doesn't the test class in that tutorial inherit anything? > Shouldn't it inherit from unittest.TestCase? the tutorial was written for use with nose, a test-runner that does not require test classes to descend from unittest.TestCase. The caveat is that you would need to run your tests with nose: http://somethingaboutorange.com/mrl/projects/nose/ > > <code> > > class TestHelloWorld: > > def setUp(self): > > pass > > > > def tearDown(self): > > pass > > </code> > > > > > > Thanks for help. > Rob > > _______________________________________________ > twill mailing list > [email protected] > http://lists.idyll.org/listinfo/twill > _______________________________________________ twill mailing list [email protected] http://lists.idyll.org/listinfo/twill
