Hi,

I'm using web2py v1.66.2 and I have some issues to run doctest within
the admin app.

Indeed, when a function in a controller is decorated, let's say with
@auth.requires_login(),
then the tests from doctests are not running and are marked as "[no
doctest]".

I assume this is due to the lack of a running environment while
running the test.

If not decorated, test are running fine. Test are somewhat basic, like
>>> index().has_key('form')
True

So, how could I instantiate a dummy environment, or maybe simpler,
have a conditional decorator
( if request.application != "admin", then decorate the function, else
leave undecorated), since my tests
are basic and do not require an auth user to call the function.

Thanks for any thoughts about this :)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to