summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2013-10-31 16:55:23 +0000
committerPetr Viktorin <pviktori@redhat.com>2014-01-24 20:29:31 +0100
commit9d863e9a96a3cb696f1d1f9313dbd4b003c489e9 (patch)
tree3985dc9e3bdd6a148f25b3c51802032b628f5586
parent97c1c95f20762055932a83cb7ac08a408437a661 (diff)
downloadfreeipa-9d863e9a96a3cb696f1d1f9313dbd4b003c489e9.zip
freeipa-9d863e9a96a3cb696f1d1f9313dbd4b003c489e9.tar.gz
freeipa-9d863e9a96a3cb696f1d1f9313dbd4b003c489e9.tar.xz
Convert remaining test code to LDAPEntry API.
-rw-r--r--ipatests/test_ipaserver/test_ldap.py8
-rw-r--r--ipatests/test_xmlrpc/test_netgroup_plugin.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/ipatests/test_ipaserver/test_ldap.py b/ipatests/test_ipaserver/test_ldap.py
index 3a63799..50bb9ca 100644
--- a/ipatests/test_ipaserver/test_ldap.py
+++ b/ipatests/test_ipaserver/test_ldap.py
@@ -61,7 +61,7 @@ class test_ldap(object):
"""
self.conn = ldap2(shared_instance=False, ldap_uri=self.ldapuri)
self.conn.connect()
- (dn, entry_attrs) = self.conn.get_entry(self.dn, ['usercertificate'])
+ entry_attrs = self.conn.get_entry(self.dn, ['usercertificate'])
cert = entry_attrs.get('usercertificate')
cert = cert[0]
serial = unicode(x509.get_serial_number(cert, x509.DER))
@@ -75,7 +75,7 @@ class test_ldap(object):
raise nose.SkipTest('Missing ccache %s' % self.ccache)
self.conn = ldap2(shared_instance=False, ldap_uri=self.ldapuri)
self.conn.connect(ccache='FILE:%s' % self.ccache)
- (dn, entry_attrs) = self.conn.get_entry(self.dn, ['usercertificate'])
+ entry_attrs = self.conn.get_entry(self.dn, ['usercertificate'])
cert = entry_attrs.get('usercertificate')
cert = cert[0]
serial = unicode(x509.get_serial_number(cert, x509.DER))
@@ -94,7 +94,7 @@ class test_ldap(object):
raise nose.SkipTest("No directory manager password in %s" % pwfile)
self.conn = ldap2(shared_instance=False, ldap_uri=self.ldapuri)
self.conn.connect(bind_dn=DN(('cn', 'directory manager')), bind_pw=dm_password)
- (dn, entry_attrs) = self.conn.get_entry(self.dn, ['usercertificate'])
+ entry_attrs = self.conn.get_entry(self.dn, ['usercertificate'])
cert = entry_attrs.get('usercertificate')
cert = cert[0]
serial = unicode(x509.get_serial_number(cert, x509.DER))
@@ -142,7 +142,7 @@ class test_ldap(object):
self.conn.connect(autobind=True)
except errors.ACIError:
raise nose.SkipTest("Only executed as root")
- (dn, entry_attrs) = self.conn.get_entry(self.dn, ['usercertificate'])
+ entry_attrs = self.conn.get_entry(self.dn, ['usercertificate'])
cert = entry_attrs.get('usercertificate')
cert = cert[0]
serial = unicode(x509.get_serial_number(cert, x509.DER))
diff --git a/ipatests/test_xmlrpc/test_netgroup_plugin.py b/ipatests/test_xmlrpc/test_netgroup_plugin.py
index 9c21e8d..da9a809 100644
--- a/ipatests/test_xmlrpc/test_netgroup_plugin.py
+++ b/ipatests/test_xmlrpc/test_netgroup_plugin.py
@@ -1306,7 +1306,7 @@ class test_netgroup(Declarative):
# raise nose.SkipTest('compat and nis are not enabled, skipping test')
# finally:
# conn.disconnect()
-# triples = entries[0][0][1]['nisnetgrouptriple']
+# triples = entries[0][0]['nisnetgrouptriple']
#
# # This may not prove to be reliable since order is not guaranteed
# # and even which user gets into which triple can be random.