def setUp(self): self.ldap_username = '******' self.pre_existing_group = 'zabbix' # Real group - do not delete! self.pre_existing_entitlement = 'horde' # Real entitlement - do not delete! # Create a simple LDAP user for testing. kwargs = { "uid": self.ldap_username, "fname": "Quillen", "lname": "Minix", "email": "*****@*****.**", "password": "******", "employeenum": "7000533", "wdid": "555555", "birthdate": "1979-04-14", "campus": "Oakland", } try: ldap_create_user(**kwargs) except: pass # Create a group self.group_cn = 'unit_test_group' self.group_description = "Delete this group" self.group_display_name = "Delete this group" try: ldap_create_group(self.group_cn, self.group_description, self.group_display_name) except: pass
def test_create_and_delete_group(self): creator = ldap_create_group("fizzy", self.group_description, self.group_display_name) assert_equal(creator, True) destroyer = ldap_delete_group("fizzy") assert_equal(destroyer, True)