#!/usr/share/ucs-test/runner python3
## desc: Add nestedGroup with single letter name to groups/group during creation
## tags: [udm,apptest]
## roles: [domaincontroller_master]
## exposure: careful
## packages:
##   - univention-config
##   - univention-directory-manager-tools

import univention.testing.strings as uts
import univention.testing.utils as utils
import univention.testing.udm as udm_test

if __name__ == '__main__':
	with udm_test.UCSTestUDM() as udm:
		nestedGroup = udm.create_group(name=uts.random_groupname(1))[0]
		group = udm.create_group(nestedGroup=nestedGroup)[0]

		utils.verify_ldap_object(group, {'uniqueMember': [nestedGroup]})
