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:
parent
6e6af9c14c
commit
e009d02bd5
@ -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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user