After some research:

In paster shell:

response = 
app.get(h.url_for(controller='template',action='view',address='index'))

works.

But, on test:

response = 
self.app.get(url_for(controller='template',action='view',address='index'))

Returns: TypeError: view() takes exactly 2 arguments (1 given)

Can somebody help me?

My routing.py for template:

map.connect('*address', controller='template', action='view')

[]'s
- Walter

[]'s
- Walter

On Jan 14, 2008 12:26 PM, Walter Cruz <[EMAIL PROTECTED]> wrote:
> Hi all.
>
> I have a little problem. I have begin to study tests, and wish to test
> my pylons application.
>
> My method view take a parameters, address.
>
> I want to test it, but don't know how to pass this parameter using nosetests.
>
> from artigos.tests import *
>
> class TestTemplateController(TestController):
>     def test_view(self):
>         response = self.app.get(url_for(controller='template',action='view'))
>
> Results in:
>
> TypeError: view() takes exactly 2 arguments (1 given)
>
> How can I pass the argument?
>
> []'s
> - Walter
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to