def test_recursive_update_new_key2(self): x2 = util_collection.recursive_update({}, 'a.b'.split('.'), 1) self.assertEqual(self.x1, x2)
def test_recursive_update_new_key(self): x2 = util_collection.recursive_update(copy.deepcopy(self.x1), 'a.c'.split('.'), 2) self.assertNotEqual(self.x1, x2)
def test_recursive_update_api(self): x2 = util_collection.recursive_update(copy.deepcopy(self.x1), 'a.b', 1) self.assertEqual(self.x1, x2)
def test_recursive_update_not_change(self): x2 = util_collection.recursive_update(copy.deepcopy(self.x1), 'a.b'.split('.'), 1) self.assertEqual(self.x1, x2)
def set_config(self, key, value): self.config = colleciton_util.recursive_update(self.config, key, value)