summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-07 11:07:03 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-07 14:22:42 +0200
commite009d02bd5718fb5e9f636a616ff3b622d68325d (patch)
tree9228f9dc1502cb9b697891d271589fb7cb009474 /source4/dsdb/tests/python
parent6e6af9c14c1a421b8c3323982e5bd8bbb69589bb (diff)
downloadsamba-e009d02bd5718fb5e9f636a616ff3b622d68325d.tar.gz
samba-e009d02bd5718fb5e9f636a616ff3b622d68325d.tar.bz2
samba-e009d02bd5718fb5e9f636a616ff3b622d68325d.zip
s4:ldap.py - test for an invalid "objectCategory" attribute
Diffstat (limited to 'source4/dsdb/tests/python')
-rwxr-xr-xsource4/dsdb/tests/python/ldap.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index 17100904a0..133ff584ac 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -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({