add test for recursive path in requirement
This commit is contained in:
parent
f8422c03e8
commit
ac62931525
|
@ -439,3 +439,14 @@ def test_requires_requirement_append():
|
|||
c = Config(od)
|
||||
c.read_write()
|
||||
raises(ValueError, 'c.cfgimpl_get_settings()[b].append("disabled")')
|
||||
|
||||
|
||||
def test_requires_recursive_path():
|
||||
a = BoolOption('activate_service', '', True)
|
||||
b = IPOption('ip_address_service', '',
|
||||
requires=[{'option': a, 'expected': False, 'action': 'disabled'}])
|
||||
od1 = OptionDescription('service', '', [a, b], requires=[{'option': a, 'expected': False, 'action': 'disabled'}])
|
||||
od = OptionDescription('base', '', [od1])
|
||||
c = Config(od)
|
||||
c.read_write()
|
||||
raises(RequirementError, 'c.service.a')
|
||||
|
|
Loading…
Reference in New Issue