s4:ldap.py - add a test for "CN=System" object rename behaviour
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 1 Aug 2010 09:26:08 +0000 (11:26 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 1 Aug 2010 12:00:10 +0000 (14:00 +0200)
source4/dsdb/tests/python/ldap.py

index 9911d5d24917761cab3ec867780e29db34cc62ef..b48ee265c82a3a950a424bd37ecc79836483b21a 100755 (executable)
@@ -937,6 +937,14 @@ objectClass: container
         except LdbError, (num, _):
             self.assertEquals(num, ERR_UNWILLING_TO_PERFORM)
 
+        # Performs some other constraints testing
+
+        try:
+            ldb.rename("CN=Policies,CN=System," + self.base_dn, "CN=Users2," + self.base_dn)
+            self.fail()
+        except LdbError, (num, _):
+            self.assertEquals(num, ERR_OTHER)
+
     def test_rename_twice(self):
         """Tests the rename operation twice - this corresponds to a past bug"""
         print "Tests the rename twice operation"""