From e63dbf308d17af4802f21004fa2447e74578ef77 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 26 Sep 2013 09:31:51 +0200 Subject: [PATCH] more tests for warnings --- test/test_option_validator.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_option_validator.py b/test/test_option_validator.py index c26e5f6..f2ccd8b 100644 --- a/test/test_option_validator.py +++ b/test/test_option_validator.py @@ -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'