From 1417ea1eed62e12affd9d55020eba84a4b322443 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Oct 2011 14:34:57 +0200 Subject: Remove pointless exception catching in tests. Autobuild-User: Jelmer Vernooij Autobuild-Date: Sun Oct 9 00:00:26 CEST 2011 on sn-devel-104 --- source4/dsdb/tests/python/dirsync.py | 9 +++------ source4/dsdb/tests/python/ldap.py | 5 +---- 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'source4/dsdb/tests') diff --git a/source4/dsdb/tests/python/dirsync.py b/source4/dsdb/tests/python/dirsync.py index dcb10a8044..6da9003bf5 100755 --- a/source4/dsdb/tests/python/dirsync.py +++ b/source4/dsdb/tests/python/dirsync.py @@ -165,12 +165,9 @@ class SimpleDirsyncTests(DirsyncBaseTests): def test_ok_not_rootdc(self): """Test if it's ok to do dirsync on another NC that is not the root DC""" - try: - res = self.ldb_admin.search(self.ldb_admin.get_config_basedn(), - expression="samaccountname=*", - controls=["dirsync:1:0:1"]) - except: - self.assertTrue(False) + self.ldb_admin.search(self.ldb_admin.get_config_basedn(), + expression="samaccountname=*", + controls=["dirsync:1:0:1"]) def test_dirsync_errors(self): """Test if dirsync returns the correct LDAP errors in case of pb""" diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py index 9f5b82f5cb..2e35eec10a 100755 --- a/source4/dsdb/tests/python/ldap.py +++ b/source4/dsdb/tests/python/ldap.py @@ -2658,10 +2658,7 @@ nTSecurityDescriptor:: """ + desc_base64 controls=["paged_results:1:10"]) self.assertEquals(len(res.controls), 1) self.assertEquals(res.controls[0].oid, "1.2.840.113556.1.4.319") - try: - s = str(res.controls[0]) - except: - self.assertFalse(True) + s = str(res.controls[0]) def test_operational(self): """Tests operational attributes""" -- cgit