コード例 #1
0
def test_addGroupMember_cas_Normal(test_config):
    GroupService.addGroupMembers(test_config['groupname'],
                                 test_config['accountname'])
    group = GroupService.getGroup(test_config['groupname'])
    assert (test_config['accountname'] in group.members)
コード例 #2
0
            args['alias'] = ()
        GroupService.updateGroupAliases(args['email'], args['alias'])
        group = GroupService.getGroup(args['email'], full_info=True)
    except Exception as err:
        raise err
        print("Echec d'exécution : {}".format(repr(err)))
        sys.exit(2)
    print(group.showAttr())

elif args['addGroupMember']:
    try:
        if not args['email']:
            raise Exception("Argument 'email' manquant")
        if not args['member']:
            raise Exception("Argument 'member' manquant")
        GroupService.addGroupMembers(args['email'], args['member'])
        group = GroupService.getGroup(args['email'], full_info=True)
    except Exception as err:
        print("Echec d'exécution : {}".format(repr(err)))
        sys.exit(2)
    print(group.showAttr())

elif args['removeGroupMember']:
    try:
        if not args['email']:
            raise Exception("Argument 'email' manquant")
        if not args['member']:
            raise Exception("Argument 'member' manquant")
        GroupService.removeGroupMembers(args['email'], args['member'])
        group = GroupService.getGroup(args['email'], full_info=True)
    except Exception as err: