support cache consistencies + no consistencies for a symlink + test
This commit is contained in:
@ -4,7 +4,7 @@ from py.test import raises
|
||||
from tiramisu.setting import owners, groups
|
||||
from tiramisu.config import Config
|
||||
from tiramisu.option import IPOption, NetworkOption, NetmaskOption, IntOption,\
|
||||
OptionDescription
|
||||
SymLinkOption, OptionDescription
|
||||
|
||||
|
||||
def test_consistency_not_equal():
|
||||
@ -22,6 +22,16 @@ def test_consistency_not_equal():
|
||||
c.b = 2
|
||||
|
||||
|
||||
def test_consistency_not_equal_symlink():
|
||||
a = IntOption('a', '')
|
||||
b = IntOption('b', '')
|
||||
c = SymLinkOption('c', a)
|
||||
od = OptionDescription('od', '', [a, b, c])
|
||||
a.impl_add_consistency('not_equal', b)
|
||||
c = Config(od)
|
||||
assert set(od._consistencies.keys()) == set([a, b])
|
||||
|
||||
|
||||
def test_consistency_not_equal_multi():
|
||||
a = IntOption('a', '', multi=True)
|
||||
b = IntOption('b', '', multi=True)
|
||||
|
Reference in New Issue
Block a user