def test_deep_setting_with_dict(self): ad = AppendingDict() ad.a.b.c = 1 ad.a = {"b": {"d": 2}} self.assertDictEqual(ad, {"a": {"b": {"c": 1, "d": 2}}})
def test_basic_appending(self): ad = AppendingDict() ad.a = 1 self.assertDictEqual(ad, {"a": 1}) ad.a = 2 self.assertDictEqual(ad, {"a": [1, 2]})