On Aug 18, 11:40 pm, Jurie-Jan Botha <[email protected]> wrote:
> I'm currently writing tests for a controller decorator that adds some
> functionality. I want to set up a simple sample controller in the test
> file and hook it up to the URL mapper so that I can play with it via
> TestApp (WebTest).
>
> Any simple way to do this?
>
> In the past I resorted to putting the sample controller in the
> 'controllers' package as I couldn't seem to get to link up the mapper
> to it when it was not there (in a separate file). I at least managed
> to work with the mapper in the __init__ of the test collection, but
> that code is pretty ugly too.
>
> Let me know if any of this requires further explanation.
This Routes syntax might work for you:
map.connect('/some/test/path',
controller='myproject.tests.controllers:MyController')
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en.