From e009d02bd5718fb5e9f636a616ff3b622d68325d Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 7 Aug 2010 11:07:03 +0200 Subject: s4:ldap.py - test for an invalid "objectCategory" attribute --- source4/dsdb/tests/python/ldap.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source4') 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({ -- cgit