From 664248d5b846321f61e0776b646cca82c5a17884 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 31 Jan 2013 08:26:38 -0500 Subject: Use IPAdmin rather than raw python-ldap in migration.py and ipadiscovery.py These used ipautil.get_ipa_basedn. Convert that to use the new wrappers. Beef up the error handling in ipaldap to accomodate the errors we catch in the server discovery. Add a DatabaseTimeout exception to errors.py. These were the last uses of ipautil.convert_ldap_error, remove that. https://fedorahosted.org/freeipa/ticket/3487 https://fedorahosted.org/freeipa/ticket/3446 --- tests/test_ipaserver/test_ldap.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/test_ipaserver/test_ldap.py b/tests/test_ipaserver/test_ldap.py index 6ac0c2243..21363f2ef 100644 --- a/tests/test_ipaserver/test_ldap.py +++ b/tests/test_ipaserver/test_ldap.py @@ -140,9 +140,8 @@ class test_ldap(object): self.conn = ldap2(shared_instance=False, ldap_uri=ldapuri) try: self.conn.connect(autobind=True) - except errors.DatabaseError, e: - if e.desc == 'Inappropriate authentication': - raise nose.SkipTest("Only executed as root") + except errors.ACIError: + raise nose.SkipTest("Only executed as root") (dn, entry_attrs) = self.conn.get_entry(self.dn, ['usercertificate']) cert = entry_attrs.get('usercertificate') cert = cert[0] -- cgit