test for property in persistent storage
This commit is contained in:
parent
2b45955886
commit
06f501ad05
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue