add test for recursive path in requirement
This commit is contained in:
parent
f8422c03e8
commit
ac62931525
1 changed files with 11 additions and 0 deletions
|
@ -439,3 +439,14 @@ def test_requires_requirement_append():
|
||||||
c = Config(od)
|
c = Config(od)
|
||||||
c.read_write()
|
c.read_write()
|
||||||
raises(ValueError, 'c.cfgimpl_get_settings()[b].append("disabled")')
|
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 a new issue