test: set force_permissive to append
This commit is contained in:
parent
9adfffe339
commit
5a5231c2d8
@ -465,6 +465,21 @@ def test_callback_master_and_slaves_master3():
|
||||
assert list(cfg.cfgimpl_get_values().mandatory_warnings()) == ['val1.val1']
|
||||
|
||||
|
||||
def test_callback_master_and_slaves_master4():
|
||||
val1 = StrOption('val1', "", ['val1'], multi=True, properties=('mandatory',))
|
||||
val2 = StrOption('val2', "", multi=True, default_multi='val2', properties=('expert', 'mandatory'))
|
||||
val3 = StrOption('val3', "", multi=True, callback=return_value, callback_params={'': ((val2, False),)})
|
||||
val4 = StrOption('val4', "", multi=True, callback=return_value, callback_params={'': ((val3, False),)})
|
||||
interface1 = OptionDescription('val1', '', [val1, val2, val3, val4])
|
||||
interface1.impl_set_group_type(groups.master)
|
||||
maconfig = OptionDescription('rootconfig', '', [interface1])
|
||||
cfg = Config(maconfig)
|
||||
cfg.read_write()
|
||||
cfg.cfgimpl_get_settings().append('expert')
|
||||
cfg.cfgimpl_get_settings().setpermissive(('expert',))
|
||||
assert list(cfg.cfgimpl_get_values().mandatory_warnings(force_permissive=True)) == []
|
||||
|
||||
|
||||
def test_callback_master_and_slaves_master_list():
|
||||
val1 = StrOption('val1', "", multi=True, callback=return_list)
|
||||
val2 = StrOption('val2', "", multi=True)
|
||||
|
Loading…
Reference in New Issue
Block a user