diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-08-07 11:07:03 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-08-07 14:22:42 +0200 |
commit | e009d02bd5718fb5e9f636a616ff3b622d68325d (patch) | |
tree | 9228f9dc1502cb9b697891d271589fb7cb009474 /source4/dsdb/tests | |
parent | 6e6af9c14c1a421b8c3323982e5bd8bbb69589bb (diff) | |
download | samba-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')
-rwxr-xr-x | source4/dsdb/tests/python/ldap.py | 10 |
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({ |