Skip to content

Commit

Permalink
fix UT
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelmsft committed Dec 9, 2022
1 parent c9d8707 commit a1eff2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/generic_config_updater/gu_common_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a1eff2b

Please sign in to comment.