mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipatests: expect boolean type for nsaccountlock in user module
user-add now returns the `nsaccountlock` parameter as a boolean instead of as a list of string, meaning tests have to be adapted to expect the correct type. Related: https://pagure.io/freeipa/issue/8743 Signed-off-by: Antonio Torres <antorres@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
committed by
Alexander Bokovoy
parent
45de2d7f39
commit
8caac84146
@@ -147,7 +147,7 @@ class StageUserTracker(KerberosAliasMixin, Tracker):
|
||||
loginshell=[platformconstants.DEFAULT_SHELL],
|
||||
has_keytab=False,
|
||||
has_password=False,
|
||||
nsaccountlock=[u'true'],
|
||||
nsaccountlock=True,
|
||||
)
|
||||
|
||||
for key in self.kwargs:
|
||||
@@ -201,14 +201,6 @@ class StageUserTracker(KerberosAliasMixin, Tracker):
|
||||
else:
|
||||
expected = self.filter_attrs(self.retrieve_keys)
|
||||
|
||||
# small override because stageuser-find returns different
|
||||
# type of nsaccountlock value than DS, but overall the value
|
||||
# fits expected result
|
||||
if expected[u'nsaccountlock'] == [u'true']:
|
||||
expected[u'nsaccountlock'] = True
|
||||
elif expected[u'nsaccountlock'] == [u'false']:
|
||||
expected[u'nsaccountlock'] = False
|
||||
|
||||
assert_deepequal(dict(
|
||||
value=self.uid,
|
||||
summary=None,
|
||||
@@ -222,14 +214,6 @@ class StageUserTracker(KerberosAliasMixin, Tracker):
|
||||
else:
|
||||
expected = self.filter_attrs(self.find_keys)
|
||||
|
||||
# small override because stageuser-find returns different
|
||||
# type of nsaccountlock value than DS, but overall the value
|
||||
# fits expected result
|
||||
if expected[u'nsaccountlock'] == [u'true']:
|
||||
expected[u'nsaccountlock'] = True
|
||||
elif expected[u'nsaccountlock'] == [u'false']:
|
||||
expected[u'nsaccountlock'] = False
|
||||
|
||||
assert_deepequal(dict(
|
||||
count=1,
|
||||
truncated=False,
|
||||
|
||||
Reference in New Issue
Block a user