diff --git a/test/test_storage.py b/test/test_storage.py index 9e36af2..eac36d4 100644 --- a/test/test_storage.py +++ b/test/test_storage.py @@ -307,3 +307,31 @@ def test_exportation_importation(): delete_session('test_persistent') delete_session('test_persistent2') delete_session('test_persistent3') + + +def test_create_persistent_context_property(): + b = BoolOption('b', '') + o = OptionDescription('od', '', [b]) + if default_storage.is_persistent(): + c = Config(o, session_id='test_persistent', persistent=True) + c.property.add('persistent') + del c + # + c = Config(o, session_id='test_persistent', persistent=True) + assert 'persistent' in c.property.get() + del c + delete_session('test_persistent') + + +def test_create_persistent_property(): + b = BoolOption('b', '') + o = OptionDescription('od', '', [b]) + if default_storage.is_persistent(): + c = Config(o, session_id='test_persistent', persistent=True) + c.option('b').property.add('persistent') + del c + # + c = Config(o, session_id='test_persistent', persistent=True) + assert 'persistent' in c.option('b').property.get() + del c + delete_session('test_persistent')