support callback with submulti
This commit is contained in:
@ -433,6 +433,20 @@ async def test_callback_submulti():
|
||||
assert not await list_sessions()
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_callback_submulti_follower():
|
||||
multi = StrOption('multi', '', multi=True)
|
||||
multi2 = StrOption('multi2', '', Calculation(return_list), multi=submulti)
|
||||
od = Leadership('multi', '', [multi, multi2])
|
||||
od = OptionDescription('multi', '', [od])
|
||||
async with await Config(od) as cfg:
|
||||
await cfg.property.read_write()
|
||||
assert await cfg.option('multi.multi').value.get() == []
|
||||
await cfg.option('multi.multi').value.set(['val'])
|
||||
assert await cfg.option('multi.multi2', 0).value.get() == ['val', 'val']
|
||||
assert not await list_sessions()
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_submulti_unique():
|
||||
i = IntOption('int', '', multi=submulti, properties=('unique',))
|
||||
|
Reference in New Issue
Block a user