summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-01-31 08:26:38 -0500
committerMartin Kosek <mkosek@redhat.com>2013-03-13 12:36:33 +0100
commit664248d5b846321f61e0776b646cca82c5a17884 (patch)
tree63547fb882cfc17b82284042da8a3073bc42f8bd /tests
parenta0242334feb3da01430f517806768965dabe92c2 (diff)
downloadfreeipa-664248d5b846321f61e0776b646cca82c5a17884.tar.gz
freeipa-664248d5b846321f61e0776b646cca82c5a17884.tar.xz
freeipa-664248d5b846321f61e0776b646cca82c5a17884.zip
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
Diffstat (limited to 'tests')
-rw-r--r--tests/test_ipaserver/test_ldap.py5
1 files changed, 2 insertions, 3 deletions
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]