mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
Tests: Fix failing test_ipalib/test_parameters
Parameters test fails because of KeyError caused by improper manipulation with kwargs in Param.__init__ method. During initialization, if kwargs['required'] or kwargs['multivalue'] is None, it is delete from dictionary and hence the missing key. Small change of the condition prevents this from happening. Partially fixes https://fedorahosted.org/freeipa/ticket/6292 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
parent
8e02652e7c
commit
c3e3130a35
@ -473,7 +473,7 @@ class Param(ReadOnly):
|
||||
CALLABLE_ERROR % (key, value, type(value))
|
||||
)
|
||||
kw[key] = value
|
||||
else:
|
||||
elif key not in ('required', 'multivalue'):
|
||||
kw.pop(key, None)
|
||||
|
||||
# We keep these values to use in __repr__():
|
||||
|
Loading…
Reference in New Issue
Block a user