diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-09-25 11:49:17 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@sn-devel-104.sn.samba.org> | 2010-10-03 15:23:19 +0000 |
commit | b2385e3725e9c41820b315c202a559f875b50743 (patch) | |
tree | 24d5052510cc495f20d8477fee78c3d1630d2195 /source4/dsdb/tests | |
parent | dda6c354f6f2c1da95cf42cea90f76ce033de38e (diff) | |
download | samba-b2385e3725e9c41820b315c202a559f875b50743.tar.gz samba-b2385e3725e9c41820b315c202a559f875b50743.tar.bz2 samba-b2385e3725e9c41820b315c202a559f875b50743.zip |
s4:ldap.py - remove the delete tests
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/tests')
-rwxr-xr-x | source4/dsdb/tests/python/ldap.py | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py index bda612ac2e..8af9b11dbc 100755 --- a/source4/dsdb/tests/python/ldap.py +++ b/source4/dsdb/tests/python/ldap.py @@ -112,8 +112,6 @@ class BasicTests(unittest.TestCase): self.delete_force(self.ldb, "cn=ldaptestcomputer3,cn=computers," + self.base_dn) self.delete_force(self.ldb, "cn=ldaptestutf8user èùéìòà,cn=users," + self.base_dn) self.delete_force(self.ldb, "cn=ldaptestutf8user2 èùéìòà,cn=users," + self.base_dn) - self.delete_force(self.ldb, "cn=entry1,cn=ldaptestcontainer," + self.base_dn) - self.delete_force(self.ldb, "cn=entry2,cn=ldaptestcontainer," + self.base_dn) self.delete_force(self.ldb, "cn=ldaptestcontainer," + self.base_dn) self.delete_force(self.ldb, "cn=ldaptestcontainer2," + self.base_dn) self.delete_force(self.ldb, "cn=parentguidtest,cn=users," + self.base_dn) @@ -1792,96 +1790,6 @@ objectClass: container self.assertEquals(len(res), 1) self.assertTrue("subScheamSubEntry" not in res[0]) - def test_delete(self): - """Tests the delete operation""" - print "Tests the delete operations""" - - ldb.add({ - "dn": "cn=ldaptestcontainer," + self.base_dn, - "objectclass": "container"}) - ldb.add({ - "dn": "cn=entry1,cn=ldaptestcontainer," + self.base_dn, - "objectclass": "container"}) - ldb.add({ - "dn": "cn=entry2,cn=ldaptestcontainer," + self.base_dn, - "objectclass": "container"}) - - try: - ldb.delete("cn=ldaptestcontainer," + self.base_dn) - self.fail() - except LdbError, (num, _): - self.assertEquals(num, ERR_NOT_ALLOWED_ON_NON_LEAF) - - ldb.delete("cn=ldaptestcontainer," + self.base_dn, ["tree_delete:0"]) - - try: - res = ldb.search("cn=ldaptestcontainer," + self.base_dn, - scope=SCOPE_BASE, attrs=[]) - self.fail() - except LdbError, (num, _): - self.assertEquals(num, ERR_NO_SUCH_OBJECT) - try: - res = ldb.search("cn=entry1,cn=ldaptestcontainer," + self.base_dn, - scope=SCOPE_BASE, attrs=[]) - self.fail() - except LdbError, (num, _): - self.assertEquals(num, ERR_NO_SUCH_OBJECT) - try: - res = ldb.search("cn=entry2,cn=ldaptestcontainer," + self.base_dn, - scope=SCOPE_BASE, attrs=[]) - self.fail() - except LdbError, (num, _): - self.assertEquals(num, ERR_NO_SUCH_OBJECT) - - self.delete_force(self.ldb, "cn=entry1,cn=ldaptestcontainer," + self.base_dn) - self.delete_force(self.ldb, "cn=entry2,cn=ldaptestcontainer," + self.base_dn) - self.delete_force(self.ldb, "cn=ldaptestcontainer," + self.base_dn) - - # Performs some protected object delete testing - - res = ldb.search(base="", expression="", scope=SCOPE_BASE, - attrs=["dsServiceName", "dNSHostName"]) - self.assertEquals(len(res), 1) - - try: - ldb.delete(res[0]["dsServiceName"][0]) - self.fail() - except LdbError, (num, _): - self.assertEquals(num, ERR_UNWILLING_TO_PERFORM) - - res = ldb.search(self.base_dn, scope=SCOPE_SUBTREE, - attrs=["rIDSetReferences"], - expression="(&(objectClass=computer)(dNSHostName=" + res[0]["dNSHostName"][0] + "))") - self.assertEquals(len(res), 1) - - try: - ldb.delete(res[0]["rIDSetReferences"][0]) - self.fail() - except LdbError, (num, _): - self.assertEquals(num, ERR_UNWILLING_TO_PERFORM) - - try: - ldb.delete("cn=Enterprise Schema,cn=Partitions," + self.configuration_dn) - self.fail() - except LdbError, (num, _): - self.assertEquals(num, ERR_UNWILLING_TO_PERFORM) - -# TODO: This fails with LDB_ERR_NOT_ALLOWED_ON_NON_LEAF on Windows -# try: -# ldb.delete("cn=Enterprise Configuration,cn=Partitions," + self.configuration_dn) -# self.fail() -# except LdbError, (num, _): -# self.assertEquals(num, ERR_UNWILLING_TO_PERFORM) - - # Performs some "systemFlags" testing - - # Delete failing since "SYSTEM_FLAG_DISALLOW_DELETE" - try: - ldb.delete("CN=Users," + self.base_dn) - self.fail() - except LdbError, (num, _): - self.assertEquals(num, ERR_UNWILLING_TO_PERFORM) - def test_all(self): """Basic tests""" |