示例#1
0
 def test_setdefault_parent(self):
     from benben.sqla import NestedMutationDict
     mdict = NestedMutationDict({})
     assert mdict.setdefault('bar', []).__parent__ is mdict
示例#2
0
 def test_setdefault_list(self):
     from benben.sqla import NestedMutationDict
     from benben.sqla import NestedMutationList
     mdict = NestedMutationDict({})
     assert isinstance(mdict.setdefault('bar', []), NestedMutationList)