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