more tests for warnings

This commit is contained in:
Emmanuel Garette 2013-09-26 09:31:51 +02:00
parent 329b9ac349
commit e63dbf308d
1 changed files with 6 additions and 0 deletions

View File

@ -108,3 +108,9 @@ def test_validator_warning_master_slave():
cfg.ip_admin_eth0.ip_admin_eth0 = ['val']
assert cfg.ip_admin_eth0.ip_admin_eth0 == ['val']
assert cfg.cfgimpl_get_values().get_last_warning() == 'invalid value val for option ip_admin_eth0: error'
cfg.ip_admin_eth0.ip_admin_eth0 = ['val', 'val1', 'val1']
assert cfg.cfgimpl_get_values().get_last_warning() == 'invalid value val for option ip_admin_eth0: error'
cfg.ip_admin_eth0.ip_admin_eth0 = ['val1', 'val', 'val1']
assert cfg.cfgimpl_get_values().get_last_warning() == 'invalid value val for option ip_admin_eth0: error'
cfg.ip_admin_eth0.ip_admin_eth0 = ['val1', 'val1', 'val']
assert cfg.cfgimpl_get_values().get_last_warning() == 'invalid value val for option ip_admin_eth0: error'