diff options
author | Noel Power <noel.power@suse.com> | 2018-05-04 13:33:03 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-05-12 21:38:17 +0200 |
commit | 521bc6056edc5252f2256664f4eacba13a3749e3 (patch) | |
tree | 247032af44f45bd5f1e441452a6bfc0edca94f2f /source4 | |
parent | 504fca732a3ed0865c39772767ee520f99a93cad (diff) | |
download | samba-521bc6056edc5252f2256664f4eacba13a3749e3.tar.gz |
Bulk: enclose .keys() method with list where list (from python2) expected
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/dsdb/tests/python/acl.py | 12 | ||||
-rw-r--r-- | source4/heimdal/lib/wind/gen-normalize.py | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py index 25588f6fe10..e3fb424e5f3 100755 --- a/source4/dsdb/tests/python/acl.py +++ b/source4/dsdb/tests/python/acl.py @@ -943,14 +943,14 @@ class AclSearchTests(AclTests): scope=SCOPE_SUBTREE) ok_list = ['dn'] self.assertEquals(len(res), 1) - res_list = res[0].keys() + res_list = list(res[0].keys()) self.assertEquals(res_list, ok_list) res = self.ldb_user.search("OU=ou2,OU=ou1," + self.base_dn, expression="(objectClass=*)", scope=SCOPE_BASE, attrs=["ou"]) self.assertEquals(len(res), 1) - res_list = res[0].keys() + res_list = list(res[0].keys()) self.assertEquals(res_list, ok_list) #give read property on ou and assert user can only see dn and ou @@ -961,7 +961,7 @@ class AclSearchTests(AclTests): scope=SCOPE_SUBTREE) ok_list = ['dn', 'ou'] self.assertEquals(len(res), 1) - res_list = res[0].keys() + res_list = list(res[0].keys()) self.assertEquals(sorted(res_list), sorted(ok_list)) #give read property on Public Information and assert user can see ou and other members @@ -972,7 +972,7 @@ class AclSearchTests(AclTests): scope=SCOPE_SUBTREE) ok_list = ['dn', 'objectClass', 'ou', 'distinguishedName', 'name', 'objectGUID', 'objectCategory'] - res_list = res[0].keys() + res_list = list(res[0].keys()) self.assertEquals(sorted(res_list), sorted(ok_list)) def test_search6(self): @@ -997,7 +997,7 @@ class AclSearchTests(AclTests): scope=SCOPE_SUBTREE) self.assertEquals(len(res), 1) ok_list = ['dn', 'ou'] - res_list = res[0].keys() + res_list = list(res[0].keys()) self.assertEquals(sorted(res_list), sorted(ok_list)) #give read property on Public Information and assert user can see ou and other members @@ -1007,7 +1007,7 @@ class AclSearchTests(AclTests): scope=SCOPE_SUBTREE) self.assertEquals(len(res), 1) ok_list = ['dn', 'objectClass', 'ou', 'distinguishedName', 'name', 'objectGUID', 'objectCategory'] - res_list = res[0].keys() + res_list = list(res[0].keys()) self.assertEquals(sorted(res_list), sorted(ok_list)) #tests on ldap delete operations diff --git a/source4/heimdal/lib/wind/gen-normalize.py b/source4/heimdal/lib/wind/gen-normalize.py index 9b3553c46d0..e51893db3b8 100644 --- a/source4/heimdal/lib/wind/gen-normalize.py +++ b/source4/heimdal/lib/wind/gen-normalize.py @@ -51,7 +51,7 @@ ud = UnicodeData.read(sys.argv[1]) def sortedKeys(d): """Return a sorted list of the keys of a dict""" - keys = d.keys() + keys = list(d.keys()) keys.sort() return keys |