support callback with propertyerror in master for mandatory_warnings
This commit is contained in:
@ -452,6 +452,19 @@ def test_callback_master_and_slaves_master2():
|
||||
assert cfg.val1.val2 == ['val2']
|
||||
|
||||
|
||||
def test_callback_master_and_slaves_master3():
|
||||
val1 = StrOption('val1', "", multi=True, properties=('mandatory', 'empty'))
|
||||
val2 = StrOption('val2', "", multi=True, default_multi='val2', properties=('expert',))
|
||||
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()
|
||||
assert list(cfg.cfgimpl_get_values().mandatory_warnings()) == ['val1.val1']
|
||||
|
||||
|
||||
def test_callback_master_and_slaves_master_list():
|
||||
val1 = StrOption('val1', "", multi=True, callback=return_list)
|
||||
val2 = StrOption('val2', "", multi=True)
|
||||
|
Reference in New Issue
Block a user