s4:ldap.py - fix "system only" test
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Wed, 29 Sep 2010 17:39:17 +0000 (19:39 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 3 Oct 2010 10:05:13 +0000 (12:05 +0200)
A part was missing

source4/dsdb/tests/python/ldap.py

index e4c163304fc3f82f0e477fdcef712c17c13177e8..f214d1951206484cc6f324249134fcb3a0fcbde9 100755 (executable)
@@ -355,6 +355,14 @@ class BasicTests(unittest.TestCase):
         except LdbError, (num, _):
             self.assertEquals(num, ERR_UNWILLING_TO_PERFORM)
 
+        try:
+            self.ldb.add({
+                "dn": "cn=testsecret,cn=system," + self.base_dn,
+                "objectclass": "secret"})
+            self.fail()
+        except LdbError, (num, _):
+            self.assertEquals(num, ERR_UNWILLING_TO_PERFORM)
+
         self.delete_force(self.ldb, "cn=ldaptestobject," + self.base_dn)
         self.delete_force(self.ldb, "cn=testsecret,cn=system," + self.base_dn)