mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 15:40:01 -06:00
Test and docstring fixes
The recent conversions to managed permissions left behind a few failing tests. Fix them. Also fix a now incorrect docstring in ipalib.config. Reviewed-By: Martin Kosek <mkosek@redhat.com>
This commit is contained in:
parent
f486d23ad6
commit
013bf3d4e2
@ -105,15 +105,11 @@ class Env(object):
|
||||
u'false'
|
||||
|
||||
If an ``str`` value looks like an integer, it's automatically converted to
|
||||
the ``int`` type. Likewise, if an ``str`` value looks like a floating-point
|
||||
number, it's automatically converted to the ``float`` type. For example:
|
||||
the ``int`` type.
|
||||
|
||||
>>> env.lucky = '7'
|
||||
>>> env.lucky
|
||||
7
|
||||
>>> env.three_halves = '1.5'
|
||||
>>> env.three_halves
|
||||
1.5
|
||||
|
||||
Leading and trailing white-space is automatically stripped from ``str``
|
||||
values. For example:
|
||||
|
@ -466,9 +466,9 @@ class test_old_permission(Declarative):
|
||||
summary=u'2 permissions matched',
|
||||
result=[
|
||||
{
|
||||
'dn': DN(('cn','Modify Group Password Policy'),
|
||||
'dn': DN(('cn', 'System: Modify Group Password Policy'),
|
||||
api.env.container_permission, api.env.basedn),
|
||||
'cn': [u'Modify Group Password Policy'],
|
||||
'cn': [u'System: Modify Group Password Policy'],
|
||||
},
|
||||
{
|
||||
'dn': DN(('cn', 'System: Read Group Password Policy'),
|
||||
@ -796,10 +796,10 @@ class test_old_permission(Declarative):
|
||||
summary=u'1 permission matched',
|
||||
result=[
|
||||
{
|
||||
'dn': DN(('cn','Add user to default group'),
|
||||
'dn': DN(('cn', 'System: Add User to default group'),
|
||||
api.env.container_permission, api.env.basedn),
|
||||
'cn': [u'Add user to default group'],
|
||||
'objectclass': objectclasses.system_permission,
|
||||
'cn': [u'System: Add User to default group'],
|
||||
'objectclass': objectclasses.permission,
|
||||
'member_privilege': [u'User Administrators'],
|
||||
'attrs': [u'member'],
|
||||
'targetgroup': u'ipausers',
|
||||
@ -807,7 +807,9 @@ class test_old_permission(Declarative):
|
||||
'permissions': [u'write'],
|
||||
'ipapermbindruletype': [u'permission'],
|
||||
'ipapermtarget': [DN('cn=ipausers', groups_dn)],
|
||||
'subtree': u'ldap:///%s' % api.env.basedn,
|
||||
'subtree': u'ldap:///%s' % groups_dn,
|
||||
'ipapermdefaultattr': [u'member'],
|
||||
'ipapermissiontype': [u'V2', u'MANAGED', u'SYSTEM'],
|
||||
}
|
||||
],
|
||||
),
|
||||
|
@ -758,9 +758,9 @@ class test_permission(Declarative):
|
||||
summary=u'2 permissions matched',
|
||||
result=[
|
||||
{
|
||||
'dn': DN(('cn','Modify Group Password Policy'),
|
||||
'dn': DN(('cn', 'System: Modify Group Password Policy'),
|
||||
api.env.container_permission, api.env.basedn),
|
||||
'cn': [u'Modify Group Password Policy'],
|
||||
'cn': [u'System: Modify Group Password Policy'],
|
||||
},
|
||||
{
|
||||
'dn': DN(('cn', 'System: Read Group Password Policy'),
|
||||
@ -1193,10 +1193,10 @@ class test_permission(Declarative):
|
||||
summary=u'1 permission matched',
|
||||
result=[
|
||||
{
|
||||
'dn': DN(('cn','Add user to default group'),
|
||||
'dn': DN(('cn', 'System: Add User to default group'),
|
||||
api.env.container_permission, api.env.basedn),
|
||||
'cn': [u'Add user to default group'],
|
||||
'objectclass': objectclasses.system_permission,
|
||||
'cn': [u'System: Add User to default group'],
|
||||
'objectclass': objectclasses.permission,
|
||||
'member_privilege': [u'User Administrators'],
|
||||
'attrs': [u'member'],
|
||||
'targetgroup': [u'ipausers'],
|
||||
@ -1206,7 +1206,9 @@ class test_permission(Declarative):
|
||||
'ipapermtarget': [DN(
|
||||
'cn=ipausers', api.env.container_group,
|
||||
api.env.basedn)],
|
||||
'ipapermlocation': [api.env.basedn],
|
||||
'ipapermlocation': [groups_dn],
|
||||
'ipapermdefaultattr': [u'member'],
|
||||
'ipapermissiontype': [u'V2', u'MANAGED', u'SYSTEM'],
|
||||
}
|
||||
],
|
||||
),
|
||||
|
@ -70,7 +70,7 @@ class test_realmdomains(Declarative):
|
||||
u'(targetfilter = "(objectclass=domainrelatedobject)")'
|
||||
u'(version 3.0;acl '
|
||||
u'"permission:System: Read Realm Domains";'
|
||||
u'allow (read,compare,search) '
|
||||
u'allow (compare,read,search) '
|
||||
u'userdn = "ldap:///all";)'
|
||||
],
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user