예제 #1
0
 def test_dict_merge(self):
     test_dict = {}
     with patch.dict(test_dict, SIMPLE_DICT):
         self.assertDictEqual(consul_pillar.dict_merge(test_dict, SIMPLE_DICT), SIMPLE_DICT)
     with patch.dict(test_dict, {'key1': {'key3': {'key4': 'value'}}}):
         self.assertDictEqual(consul_pillar.dict_merge(test_dict, SIMPLE_DICT),
                              {'key1': {'key2': 'val1', 'key3': {'key4': 'value'}}})
예제 #2
0
 def test_dict_merge(self):
     test_dict = {}
     with patch.dict(test_dict, SIMPLE_DICT):
         self.assertDictEqual(
             consul_pillar.dict_merge(test_dict, SIMPLE_DICT), SIMPLE_DICT
         )
     with patch.dict(test_dict, {"key1": {"key3": {"key4": "value"}}}):
         self.assertDictEqual(
             consul_pillar.dict_merge(test_dict, SIMPLE_DICT),
             {"key1": {"key2": "val1", "key3": {"key4": "value"}}},
         )