Example #1
0
 def test_should_not_change_values_by_update(self):
     base = {'eggs': 42, 'spam': 'ham'}
     my_dict = AttrDict(base)
     new = {'cheese': 10}
     new_dict = AttrDict(new)
     my_dict.update(new_dict)
     self.assertEqual(my_dict.eggs, 42)
     self.assertEqual(my_dict.cheese, 10)
Example #2
0
 def test_should_not_change_values_by_update(self):
     base = {"eggs": 42, "spam": "ham"}
     my_dict = AttrDict(base)
     new = {"cheese": 10}
     new_dict = AttrDict(new)
     my_dict.update(new_dict)
     self.assertEqual(my_dict.eggs, 42)
     self.assertEqual(my_dict.cheese, 10)