예제 #1
0
def test_create_user_group(config):
    conn, params = config
    usergroups = umapi_client.UserGroups(conn)
    groupName = "Test-Dummy-Group"
    groupID = usergroups.getGroupIDByName(groupName)
    if groupID:
        usergroups.delete(groupName)
    result = usergroups.create("Test-Dummy-Group")
    assert result.name == "Test-Dummy-Group"
예제 #2
0
def test_remove_user_group(config):
    conn, params = config
    usergroups = umapi_client.UserGroups(conn)
    groupName = "Test-Dummy-Group"
    groupID = usergroups.getGroupIDByName(groupName)
    if not groupID:
        result = usergroups.create(groupName)
        groupID = result.groupid
    usergroups.delete(groupID)
    assert usergroups.getGroupIDByName(groupName) == None