def action_30_base_data(): if Permission: Permission.add_iu(name=u'webapp-controlpanel')
def action_30_perms(): Permission.add_iu(name=u'widget-delete')
def test_permission_get_by_name(): p = Permission.add_iu(name=u'permission_for_testing_%s' % randchars(15)) assert Permission.get_by(name=p.name).id == p.id
def test_permission_unique(): p1 = Permission.add_iu(name=u'test unique permission name') p2 = Permission.add_iu(name=u'test unique permission name') assert p1 and p2 is None
def action_30_base_data(): Permission.add_iu(name=u'auth-manage')
def action_40_test_data(): Permission.add_iu(name=u'ugp_approved') Permission.add_iu(name=u'ugp_denied') Permission.add_iu(name=u'users-test1') Permission.add_iu(name=u'users-test2') Permission.add_iu(name=u'prof-test-1') Permission.add_iu(name=u'prof-test-2')