Esempio n. 1
0
 def test_add_dicts(self):
     """ Merge two dicts of values together """
     a = {
         'a': 1,
         'b': 2,
     }
     b = {
         'a': 3,
         'c': 4,
     }
     ret = add_dicts(a, b)
     self.assertEqual(ret, {
         'a': 4,
         'b': 2,
         'c': 4,
     })
Esempio n. 2
0
 def test_add_dicts(self):
     """ Merge two dicts of values together """
     a = {
         'a': 1,
         'b': 2,
     }
     b = {
         'a': 3,
         'c': 4,
     }
     ret = add_dicts(a, b)
     self.assertEqual(ret, {
         'a': 4,
         'b': 2,
         'c': 4,
     })
Esempio n. 3
0
 def test_add_dicts(self):
     """Merge two dicts of values together"""
     a = {
         "a": 1,
         "b": 2,
     }
     b = {
         "a": 3,
         "c": 4,
     }
     ret = add_dicts(a, b)
     self.assertEqual(
         ret,
         {
             "a": 4,
             "b": 2,
             "c": 4,
         },
     )
Esempio n. 4
0
 def test_add_dicts_base_case(self):
     """ add_dict where one argument is None returns the other """
     f = object()
     self.assertEqual(add_dicts(f, None), f)
     self.assertEqual(add_dicts(None, f), f)
Esempio n. 5
0
 def test_add_dicts_base_case(self):
     """ add_dict where one argument is None returns the other """
     f = object()
     self.assertEqual(add_dicts(f, None), f)
     self.assertEqual(add_dicts(None, f), f)