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"
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