sqlalchemy
This commit is contained in:
@ -85,7 +85,7 @@ def test_base_config_and_groups():
|
||||
assert nm.impl_getname() == 'name'
|
||||
gc = config.unwrap_from_path('gc')
|
||||
assert gc.impl_getname() == 'gc'
|
||||
#nm = config.unwrap_fromimpl_getname()('name')
|
||||
#nm = config.unwrap_from_name('name')
|
||||
#assert nm.impl_getname() == 'name'
|
||||
|
||||
|
||||
|
@ -146,10 +146,10 @@ def test_force_store_value():
|
||||
assert conf.getowner(conf.unwrap_from_path('wantref')) == 'user'
|
||||
|
||||
|
||||
#def test_force_store_value_ro():
|
||||
# descr = make_description_freeze()
|
||||
# conf = Config(descr)
|
||||
# conf.read_only()
|
||||
# assert conf.getowner(conf.unwrap_from_path('wantref')) == 'default'
|
||||
# conf.wantref
|
||||
# assert conf.getowner(conf.unwrap_from_path('wantref')) == 'user'
|
||||
def test_force_store_value_ro():
|
||||
descr = make_description_freeze()
|
||||
conf = Config(descr)
|
||||
conf.read_only()
|
||||
assert conf.getowner(conf.unwrap_from_path('wantref')) == 'default'
|
||||
conf.wantref
|
||||
assert conf.getowner(conf.unwrap_from_path('wantref')) == 'user'
|
||||
|
@ -102,8 +102,7 @@ def test_consistency_after_config():
|
||||
od2 = OptionDescription('od2', '', [b])
|
||||
od = OptionDescription('root', '', [od1, od2])
|
||||
Config(od)
|
||||
#FIXME a cause du read_only
|
||||
#raises(AttributeError, "a.impl_add_consistency('not_equal', b)")
|
||||
raises(AttributeError, "a.impl_add_consistency('not_equal', b)")
|
||||
|
||||
|
||||
def test_consistency_not_equal_symlink():
|
||||
|
@ -503,19 +503,19 @@ def test_requires_multi_disabled_inverse_2():
|
||||
assert props == ['disabled']
|
||||
|
||||
|
||||
#def test_requires_requirement_append():
|
||||
# a = BoolOption('activate_service', '', True)
|
||||
# b = IPOption('ip_address_service', '',
|
||||
# requires=[{'option': a, 'expected': False, 'action': 'disabled'}])
|
||||
# od = OptionDescription('service', '', [a, b])
|
||||
# c = Config(od)
|
||||
# c.read_write()
|
||||
# str(c.cfgimpl_get_settings())
|
||||
# str(c.cfgimpl_get_settings()[b])
|
||||
# raises(ValueError, 'c.cfgimpl_get_settings()[b].append("disabled")')
|
||||
# c.activate_service = False
|
||||
# # disabled is now set, test to remove disabled before store in storage
|
||||
# c.cfgimpl_get_settings()[b].append("test")
|
||||
def test_requires_requirement_append():
|
||||
a = BoolOption('activate_service', '', True)
|
||||
b = IPOption('ip_address_service', '',
|
||||
requires=[{'option': a, 'expected': False, 'action': 'disabled'}])
|
||||
od = OptionDescription('service', '', [a, b])
|
||||
c = Config(od)
|
||||
c.read_write()
|
||||
str(c.cfgimpl_get_settings())
|
||||
str(c.cfgimpl_get_settings()[b])
|
||||
raises(ValueError, 'c.cfgimpl_get_settings()[b].append("disabled")')
|
||||
c.activate_service = False
|
||||
# disabled is now set, test to remove disabled before store in storage
|
||||
c.cfgimpl_get_settings()[b].append("test")
|
||||
|
||||
|
||||
def test_requires_different_inverse():
|
||||
|
Reference in New Issue
Block a user