On Fri, Feb 19, 2016 at 10:20 PM, Thomas De Schampheleire <
patrickdeping...@gmail.com> wrote:

> Currently the test initialization code has
> some pylons specifics which I don't understand (and thus fail to
> convert to a Turbogears equivalent).
>
> Essentially, the setup code in TestController is:
>
>         self.wsgiapp = pylons.test.pylonsapp
>         init_stack(self.wsgiapp.config)
>         self.app = TestApp(self.wsgiapp)
>
> with init_stack being:
>
> def init_stack(config=None):


I didn't have time to look at it so far, sorry, but by a quick view of what
init_stack is doing it looks like it's mostly setting up the Pylons global
objects even when not inside a request. That should be fairly equivalent to
performing a request to '/_test_vars' in TurboGears or using
http://turbogears.readthedocs.org/en/latest/reference/classes.html#tg.util.webtest.test_context


See
http://turbogears.readthedocs.org/en/latest/turbogears/testing.html#testing-outside-controllers
it might provide a few useful details.
_______________________________________________
kallithea-general mailing list
kallithea-general@sfconservancy.org
http://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to