when use config.new(), copy properties and permissives

This commit is contained in:
2018-09-13 06:50:26 +02:00
parent e41af1fdce
commit ccf3f0ae06
2 changed files with 7 additions and 3 deletions

View File

@ -77,9 +77,9 @@ def test_copy_force_store_value():
def test_copy_force_store_value_metaconfig():
descr = make_description()
meta = MetaConfig([], optiondescription=descr)
meta.property.read_only()
conf = meta.config.new(session_id='conf')
assert meta.property.get() == conf.property.get()
assert meta.permissive.get() == conf.permissive.get()
assert to_tuple(conf.value.exportation()) == (('creole.general.wantref',), (None,), (False,), ('forced',))
assert to_tuple(meta.value.exportation()) == (('creole.general.wantref',), (None,), (False,), ('forced',))
conf.option('creole.general.wantref').value.set(True)
assert to_tuple(conf.value.exportation()) == (('creole.general.wantref',), (None,), (True,), ('user',))
assert to_tuple(meta.value.exportation()) == (('creole.general.wantref',), (None,), (False,), ('forced',))