mandatories masterslaves with consistency and default value is acceptable
This commit is contained in:
@ -753,3 +753,15 @@ def test_consistency_warnings_error():
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
raises(ValueError, "cfg.a = 1")
|
||||
assert w == []
|
||||
|
||||
|
||||
def test_consistency_network_netmask_mandatory():
|
||||
a = NetworkOption('a', '', multi=True, properties=('mandatory',), default=[u'0.0.0.0'])
|
||||
b = NetmaskOption('b', '', multi=True, properties=('mandatory',), default_multi=u'0.0.0.0')
|
||||
od = OptionDescription('a', '', [a, b])
|
||||
od.impl_set_group_type(groups.master)
|
||||
b.impl_add_consistency('network_netmask', a)
|
||||
c = Config(od)
|
||||
c.read_only()
|
||||
c.cfgimpl_get_settings().remove('mandatory')
|
||||
c.make_dict()
|
||||
|
Reference in New Issue
Block a user