[web2py] Re: Unit testing and faking authentication

2015-11-06 Thread Yang
Hello, is there a way to fake the user group and membership as well? Thanks! On Saturday, April 7, 2012 at 5:24:09 PM UTC+2, Anthony wrote: > > For @auth.requires_login() to pass, I think you just need auth.user to > exist (and not be None). If your layout includes auth.navbar(), I think the >

[web2py] Re: Unit testing and faking authentication

2012-04-07 Thread Anthony
For @auth.requires_login() to pass, I think you just need auth.user to exist (and not be None). If your layout includes auth.navbar(), I think the auth.user object at least needs to include an "id" attribute as well (i.e., auth.user.id should be some integer). So maybe add something like this in