simplification
This commit is contained in:
@ -126,6 +126,31 @@ def test_mandatory_default():
|
||||
assert 'mandatory' in prop
|
||||
|
||||
|
||||
def test_mandatory_delete():
|
||||
descr = make_description()
|
||||
config = Config(descr)
|
||||
config.read_only()
|
||||
config.str
|
||||
try:
|
||||
config.str1
|
||||
except PropertiesOptionError as err:
|
||||
prop = err.proptype
|
||||
assert 'mandatory' in prop
|
||||
config.read_write()
|
||||
config.str1 = 'yes'
|
||||
config.read_only()
|
||||
assert config.str1 == 'yes'
|
||||
config.cfgimpl_get_settings().remove('frozen')
|
||||
prop = []
|
||||
try:
|
||||
del(config.str1)
|
||||
except PropertiesOptionError as err:
|
||||
prop = err.proptype
|
||||
assert 'mandatory' in prop
|
||||
del(config.str)
|
||||
assert config.str1 == 'yes'
|
||||
|
||||
|
||||
#valeur vide : None, '', u'', ...
|
||||
def test_mandatory_none():
|
||||
descr = make_description()
|
||||
|
Reference in New Issue
Block a user