1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

s4:ldap.py - test for an invalid "objectCategory" attribute

This commit is contained in:
Matthias Dieter Wallnöfer 2010-08-07 11:07:03 +02:00
parent 6e6af9c14c
commit e009d02bd5

View File

@ -142,6 +142,16 @@ class BasicTests(unittest.TestCase):
except LdbError, (num, _):
self.assertEquals(num, ERR_NO_SUCH_ATTRIBUTE)
# Invalid objectCategory specified
try:
self.ldb.add({
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
"objectClass": "person",
"objectCategory": self.base_dn })
self.fail()
except LdbError, (num, _):
self.assertEquals(num, ERR_OBJECT_CLASS_VIOLATION)
# We cannot instanciate from an abstract objectclass
try:
self.ldb.add({