Turbogears2 migration: test suite
Alessandro Molina
alessandro.molina at gmail.com
Wed Feb 24 13:38:24 UTC 2016
On Fri, Feb 19, 2016 at 10:20 PM, Thomas De Schampheleire <
patrickdepinguin at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20160224/38bf7b30/attachment.html>
More information about the kallithea-general
mailing list