properties validation not in setting and now launch when modify multi

This commit is contained in:
2013-04-17 21:33:34 +02:00
parent 656b751995
commit 3170237c8e
8 changed files with 258 additions and 151 deletions

View File

@ -150,6 +150,15 @@ def test_mandatory_multi_empty():
assert 'mandatory' in prop
def test_mandatory_multi_append():
descr = make_description()
config = Config(descr)
setting = config.cfgimpl_get_settings()
config.str3 = ['yes']
setting.read_write()
config.str3.append(None)
def test_mandatory_disabled():
descr = make_description()
config = Config(descr)
@ -212,3 +221,16 @@ def test_mandatory_warnings_disabled():
assert list(mandatory_warnings(config)) == ['str', 'str1', 'str2', 'str3']
setting.add_property('disabled', descr.str)
assert list(mandatory_warnings(config)) == ['str1', 'str2', 'str3']
def test_mandatory_warnings_frozen():
descr = make_description()
config = Config(descr)
config.str = ''
setting = config.cfgimpl_get_settings()
setting.read_write()
config.str
assert list(mandatory_warnings(config)) == ['str', 'str1', 'str2', 'str3']
setting.add_property('frozen', descr.str)
setting.read_only()
assert list(mandatory_warnings(config)) == ['str', 'str1', 'str2', 'str3']