def test_from_list(self, dict_type): proxy = Cut(dict_type({"a": {"b": 1}})) from_other = [("a.b", 42)] proxy.update(from_other) assert proxy["a"]["b"] == 42
def test_from_list_and_keyword_args(self, dict_type): proxy = Cut(dict_type({"a": {"b": 1}})) from_other = [("a.b", 42)] proxy.update(from_other, c=666) assert proxy["a"]["b"] == 42 assert proxy["c"] == 666
def test_from_dict(self, dict_type): proxy = Cut(dict_type({"a": {"b": 1}})) proxy.update({"a.b": 42}) assert proxy["a"]["b"] == 42