示例#1
0
 def test_updating_empty_dict(self):
     result = dict_updater(source={'a': 1}, dest={})
     self.assertDictEqual({'a': 1}, result)
示例#2
0
 def test_appending_value(self):
     result = dict_updater(source={'a': 1}, dest={'b': 2})
     self.assertDictEqual({'a': 1, 'b': 2}, result)
示例#3
0
 def test_appending_dict(self):
     source = {'d': {'b': 1}}
     dest = {'a': {'c': 2}}
     result = dict_updater(source, dest)
     self.assertDictEqual({'a': {'c': 2}, 'd': {'b': 1}}, result)
示例#4
0
 def test_overriding_value(self):
     result = dict_updater(source={'a': 1}, dest={'a': 2})
     self.assertDictEqual({'a': 1}, result)