copy/deepcopy should duplicate informations

This commit is contained in:
2020-10-05 20:27:17 +02:00
parent 6910371779
commit a269cbcc93
4 changed files with 43 additions and 0 deletions

View File

@ -59,6 +59,16 @@ async def test_copy():
assert not await list_sessions()
@pytest.mark.asyncio
async def test_copy_information():
od = make_description()
async with await Config(od) as cfg:
await cfg.information.set('key', 'value')
async with await cfg.config.copy() as ncfg:
assert await ncfg.information.get('key') == 'value'
assert not await list_sessions()
@pytest.mark.asyncio
async def test_copy_force_store_value():
od = make_description()