Hi again,

Sorry for answering to myself.

I solved my problem by creating a root controller that has all the
controllers I need to test as subcontrollers. It is way easier and let me
skip understanding all the routes/pylons/tg interactions.

Christophe

2010/2/4 Christophe de VIENNE <[email protected]>

> Hi,
>
> I am attempting to port TGWebServices to TG 2.0. So far so good, I can do
> basic requests in json or xml.
>
> Before going further I need to have unittests... and here starts the hard
> part (for me) :
>
> For now I have a tgext.ws.tests module, in which I would like everything
> needed to run a minimalistic tg2 app (no database, no templates, no
> renderers, no static files). Its __init__.py is attached.
>
> The app_factory function seems to work, and I obtain, on my TestController,
> a self.app attribute.
>
> Since I have no controller and when I perform a self.app.get() routes
> complains : "No such file or directory:
> '/home/cdevienne/ws/tgws-2.0/tgext/ws/tests/controllers'".
>
> The question is :
>  - how do I set a specific root controller, and is it related to
> "setup_paths" on AppConfig ?
>
> I don't want the root to be found automatically because each test class
> will use its own. Moreover the tgext/ws/tests/controllers does not exist,
> and I would prefer not to have too much files in tests.
>
> If I am unclear, please tell me.
>
> Thanks for any hint,
>
> Christophe
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en.

Reply via email to