예제 #1
0
파일: tests.py 프로젝트: fabidick22/scalpl
 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
예제 #2
0
파일: tests.py 프로젝트: fabidick22/scalpl
 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
예제 #3
0
파일: tests.py 프로젝트: fabidick22/scalpl
 def test_from_dict(self, dict_type):
     proxy = Cut(dict_type({"a": {"b": 1}}))
     proxy.update({"a.b": 42})
     assert proxy["a"]["b"] == 42