#!/usr/share/ucs-test/runner python
## desc: Create users/user with just the mail option set (should not be possible)
## tags: [udm]
## roles: [domaincontroller_master]
## exposure: careful
## packages:
##   - univention-config
##   - univention-directory-manager-tools


import sys
import univention.testing.utils as utils
import univention.testing.udm as udm_test

if __name__ == '__main__':
	with udm_test.UCSTestUDM() as udm:
		try:
			udm.create_user(options = ['mail'])
		except udm_test.UCSTestUDM_CreateUDMObjectFailed:
			sys.exit(0)

	utils.fail('Successfully created a user with only "mail" option set, which should not be possible')



