On 10/10/05, sean <[EMAIL PROTECTED]> wrote:
> from turbogears.tests import util
> from registration.controllers import Root
> import cherrypy
>
> def test_index():
>     "Tests the output of the index page"
>     util.createRequest("/register")
>     assert "Welcome" in cherrypy.response.body[0]

The problem, I'm guessing, is that the root is not set.
util.createRequest was originally created for testing TurboGears
itself and doesn't know anything about setting cherrypy.root to your
application's root controller. It would be nice if there was some
mechanism to do that.

So, in short, adding:
cherrypy.root = Root()

before util.createRequest should make this run properly.

Kevin

Reply via email to