On Wed, 2010-06-30 at 12:02 +0700, Alex Marandon wrote: > > > On 29 June 2010 04:44, Chris Withers <ch...@simplistix.co.uk> wrote: > But now what's the "right" way to actually get the to render > the html, > preferably also testing the path dispatch to '/' at the same > time? > > > I'm not sure if it's the "right" way, but I use WebTest, a generic > WSGI testing framework: http://pythonpaste.org/webtest/ > > > The method described at > http://docs.repoze.org/bfg/current/narr/unittesting.html#creating-integration-tests > didn't work for me (ie: I'm still getting a dict, instead of a response > object). I believe it doesn't work with decorators scanning, only with what > is configured in the zcml file.
When you say scanning doesn't work, it's likely you're doing: config.scan() ... in the test setup. If so, you actually need to do: config.scan('mypackage') .. where mypackage is the name of the Python package holding the application you're trying to test. - C _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev