From a1eff2be7570fd056a468028444b894fdfbf8820 Mon Sep 17 00:00:00 2001 From: isabelmsft Date: Fri, 9 Dec 2022 01:57:40 +0000 Subject: [PATCH] fix UT --- tests/generic_config_updater/gu_common_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/generic_config_updater/gu_common_test.py b/tests/generic_config_updater/gu_common_test.py index eed42408ec1..eef9c132cb0 100644 --- a/tests/generic_config_updater/gu_common_test.py +++ b/tests/generic_config_updater/gu_common_test.py @@ -58,16 +58,16 @@ def setUp(self): self.config_wrapper_mock.get_config_db_as_json=MagicMock(return_value=Files.CONFIG_DB_AS_JSON) def test_validate_field_operation_legal(self): - old_config = {"PFC_WD": {"GLOBAL": {"POLL_INTERVAL": 60}}} - target_config = {"PFC_WD": {"GLOBAL": {}}} + old_config = {"PFC_WD": {"GLOBAL": {"POLL_INTERVAL": "60"}}} + target_config = {"PFC_WD": {"GLOBAL": {"POLL_INTERVAL": "40"}}} config_wrapper = gu_common.ConfigWrapper() config_wrapper.validate_field_operation(old_config, target_config) def test_validate_field_operation_illegal(self): old_config = {"PFC_WD": {"GLOBAL": {"POLL_INTERVAL": 60}}} - target_config = {"PFC_WD": {"GLOBAL": {"POLL_INTERVAL": None}}} + target_config = {"PFC_WD": {"GLOBAL": {}}} config_wrapper = gu_common.ConfigWrapper() - self.assertRaises(ValueError, config_wrapper.validate_field_operation, old_config, target_config) + self.assertRaises(gu_common.IllegalPatchOperationerror, config_wrapper.validate_field_operation, old_config, target_config) def test_ctor__default_values_set(self): config_wrapper = gu_common.ConfigWrapper()