mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipatests: Fix expected object classes
Because the sidgen plugin is a postop plugin, it is not always triggered before the result of an ADD is returned and the objectclasses of the user may / may not contain ipantuserattrs. Fix the expected object classes. Related: https://pagure.io/freeipa/issue/9062 Signed-off-by: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Stanislav Levin <slev@altlinux.org>
This commit is contained in:
parent
6c5530c509
commit
b6520bef2e
@ -125,7 +125,9 @@ def user_npg(request, group):
|
||||
del tracker.attrs['mepmanagedentry']
|
||||
tracker.attrs.update(
|
||||
description=[], memberof_group=[group.cn],
|
||||
objectclass=objectclasses.user_base + [u'ipantuserattrs'],
|
||||
objectclass=fuzzy_set_optional_oc(
|
||||
objectclasses.user_base, 'ipantuserattrs'
|
||||
),
|
||||
)
|
||||
return tracker.make_fixture(request)
|
||||
|
||||
@ -139,7 +141,9 @@ def user_npg2(request, group):
|
||||
del tracker.attrs['mepmanagedentry']
|
||||
tracker.attrs.update(
|
||||
gidnumber=[u'1000'], description=[], memberof_group=[group.cn],
|
||||
objectclass=objectclasses.user_base + [u'ipantuserattrs'],
|
||||
objectclass=fuzzy_set_optional_oc(
|
||||
objectclasses.user_base, 'ipantuserattrs'
|
||||
),
|
||||
)
|
||||
return tracker.make_fixture(request)
|
||||
|
||||
@ -151,8 +155,9 @@ def user_radius(request, xmlrpc_setup):
|
||||
sn=u'radiususer1',
|
||||
ipatokenradiususername=u'radiususer')
|
||||
tracker.track_create()
|
||||
tracker.attrs.update(
|
||||
objectclass=objectclasses.user + [u'ipatokenradiusproxyuser']
|
||||
tracker.attrs.update(objectclass=fuzzy_set_optional_oc(
|
||||
objectclasses.user + [u'ipatokenradiusproxyuser'],
|
||||
'ipantuserattrs'),
|
||||
)
|
||||
return tracker.make_fixture(request)
|
||||
|
||||
@ -647,7 +652,8 @@ class TestCreate(XMLRPC_test):
|
||||
testuser.attrs.update(gidnumber=[u'1000'])
|
||||
testuser.attrs.update(
|
||||
description=[],
|
||||
objectclass=objectclasses.user_base + [u'ipantuserattrs']
|
||||
objectclass=fuzzy_set_optional_oc(
|
||||
objectclasses.user_base, 'ipantuserattrs'),
|
||||
)
|
||||
command = testuser.make_create_command()
|
||||
result = command()
|
||||
@ -865,7 +871,9 @@ class TestUserWithUPGDisabled(XMLRPC_test):
|
||||
testuser.attrs.update(gidnumber=[u'1000'])
|
||||
testuser.attrs.update(
|
||||
description=[],
|
||||
objectclass=objectclasses.user_base + [u'ipantuserattrs'],
|
||||
objectclass=fuzzy_set_optional_oc(
|
||||
objectclasses.user_base, 'ipantuserattrs'
|
||||
),
|
||||
)
|
||||
command = testuser.make_create_command()
|
||||
result = command()
|
||||
|
Loading…
Reference in New Issue
Block a user