reorganise consistencies

This commit is contained in:
2017-12-23 10:55:06 +01:00
parent 7ab479f628
commit a9fed78af0
2 changed files with 153 additions and 149 deletions

View File

@ -801,18 +801,18 @@ def test_consistency_warnings_error():
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 = MasterSlaves('a', '', [a, b])
# b.impl_add_consistency('network_netmask', a)
# od2 = OptionDescription('od2', '', [od])
# api = getapi(Config(od2))
# api.property.read_only()
# api.property.pop('mandatory')
# api.option.make_dict()
#
#
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 = MasterSlaves('a', '', [a, b])
b.impl_add_consistency('network_netmask', a)
od2 = OptionDescription('od2', '', [od])
api = getapi(Config(od2))
api.property.read_only()
api.property.pop('mandatory')
api.option.make_dict()
def test_consistency_has_dependency():
a = IPOption('a', '')
b = NetmaskOption('b', '')