From 905d81f500d40b44c8e7f284af11300057e3d1b7 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mon, 21 Sep 2015 10:34:15 +0200 Subject: ipalib.aci: Port to Python 3 - Don't encode under Python 3, where shlex would choke on bytes - Sort the attrs dictionary in export_to_string, so the tests are deterministic. (The iteration order of dicts was always unspecified, but was always the same in practice under CPython 2.) Reviewed-By: Tomas Babej --- ipatests/test_xmlrpc/test_permission_plugin.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ipatests/test_xmlrpc/test_permission_plugin.py') diff --git a/ipatests/test_xmlrpc/test_permission_plugin.py b/ipatests/test_xmlrpc/test_permission_plugin.py index 88401190a..b9c8d1b98 100644 --- a/ipatests/test_xmlrpc/test_permission_plugin.py +++ b/ipatests/test_xmlrpc/test_permission_plugin.py @@ -1453,8 +1453,8 @@ class test_permission(Declarative): verify_permission_aci( permission1, api.env.basedn, - '(targetattr = "sn")' + '(target = "ldap:///%s")' % DN('cn=editors', groups_dn) + + '(targetattr = "sn")' + '(version 3.0;acl "permission:%s";' % permission1 + 'allow (write) groupdn = "ldap:///%s";)' % permission1_dn, ), @@ -1623,8 +1623,8 @@ class test_permission_rollback(Declarative): verify_permission_aci( permission1, users_dn, - '(targetattr = "sn")' + '(target = "ldap:///%s")' % DN(('uid', 'admin'), users_dn) + + '(targetattr = "sn")' + '(version 3.0;acl "permission:%s";' % permission1 + 'allow (write) groupdn = "ldap:///%s";)' % permission1_dn, ), @@ -1964,8 +1964,8 @@ class test_permission_sync_attributes(Declarative): verify_permission_aci( permission1, groups_dn, - '(targetattr = "sn")' + '(target = "ldap:///%s")' % DN(('cn', 'editors'), groups_dn) + + '(targetattr = "sn")' + '(targetfilter = "%s")' % group_filter + '(version 3.0;acl "permission:%s";' % permission1 + 'allow (write) groupdn = "ldap:///%s";)' % permission1_dn, @@ -2000,8 +2000,8 @@ class test_permission_sync_attributes(Declarative): verify_permission_aci( permission1, groups_dn, - '(targetattr = "sn")' + '(target = "ldap:///%s")' % DN(('cn', 'editors'), groups_dn) + + '(targetattr = "sn")' + '(targetfilter = "(&(cn=blabla)%s)")' % group_filter + '(version 3.0;acl "permission:%s";' % permission1 + 'allow (write) groupdn = "ldap:///%s";)' % permission1_dn, @@ -2235,8 +2235,8 @@ class test_permission_sync_nice(Declarative): verify_permission_aci( permission1, groups_dn, - '(targetattr = "sn")' + '(target = "ldap:///%s")' % DN(('cn', 'editors'), groups_dn) + + '(targetattr = "sn")' + '(targetfilter = "%s")' % group_filter + '(version 3.0;acl "permission:%s";' % permission1 + 'allow (write) groupdn = "ldap:///%s";)' % permission1_dn, -- cgit