this does not work.
*@auth.requires(True, requires_login= request.is_local)*
def execdal():
return dict(ret=1)
my pytest function
def test_execdal(web2py):
result = web2py.run('default', 'execdal', web2py)
i get an error about redirected
[image: Imagem inline 1]
2017-08-18 12:46 GMT+01:00 António Ramos <[email protected]>:
> Hello i+m testing a controller with pytest
>
> if my controller is protected like
>
> @auth.requires.login or @auth.requires_membership how can i test it ?
>
>
> def test_controller(client):
>
>
> client.get('/default/controller')
> ...
> ...
>
>
> Regards
>
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.