def test_require_group_viewable(self): """Test that the current user and group properties are set correctly.""" response = self.app.get('/in_peon_group?' 'user_name=samIam&password=secret&login=Login') user = TG_User.by_user_name("samIam") group_ids = set((TG_Group.by_group_name("peon").id, TG_Group.by_group_name("other").id))
def in_peon_group(self): user = TG_User.by_user_name("samIam") group_ids = set((TG_Group.by_group_name("peon").id, TG_Group.by_group_name("other").id)) assert identity.current.user == user assert identity.current.user_name == user.user_name assert identity.current.user_id == user.id assert identity.current.groups == set(("peon", "other")) assert identity.current.group_ids == group_ids assert "samIam" == cherrypy.serving.request.identity.user_name return "in_peon_group"
def in_peon_group(self): user = TG_User.by_user_name("samIam") group_ids = set((TG_Group.by_group_name("peon").id, TG_Group.by_group_name("other").id)) assert identity.current.user == user assert identity.current.user_name == user.user_name assert identity.current.user_id == user.id assert identity.current.groups == set(('peon', 'other')) assert identity.current.group_ids == group_ids assert "samIam" == cherrypy.serving.request.identity.user_name return 'in_peon_group'
def test_require_group_viewable(self): """Test that the current user and group properties are set correctly.""" response = self.app.get("/in_peon_group?" "user_name=samIam&password=secret&login=Login") user = TG_User.by_user_name("samIam") group_ids = set((TG_Group.by_group_name("peon").id, TG_Group.by_group_name("other").id))