Exemple #1
0
 def test_setdefault_parent(self):
     from kotti.sqla import NestedMutationDict
     mdict = NestedMutationDict({})
     assert mdict.setdefault('bar', []).__parent__ is mdict
Exemple #2
0
 def test_setdefault_list(self):
     from kotti.sqla import NestedMutationDict
     from kotti.sqla import NestedMutationList
     mdict = NestedMutationDict({})
     assert isinstance(mdict.setdefault('bar', []), NestedMutationList)
Exemple #3
0
 def test_setdefault_parent(self):
     from kotti.sqla import NestedMutationDict
     mdict = NestedMutationDict({})
     assert mdict.setdefault('bar', []).__parent__ is mdict
Exemple #4
0
 def test_setdefault_list(self):
     from kotti.sqla import NestedMutationDict
     from kotti.sqla import NestedMutationList
     mdict = NestedMutationDict({})
     assert isinstance(mdict.setdefault('bar', []), NestedMutationList)
Exemple #5
0
    def test_setdefault_dict(self):
        from kotti.sqla import NestedMutationDict

        mdict = NestedMutationDict({})
        assert isinstance(mdict.setdefault("bar", {}), NestedMutationDict)
Exemple #6
0
    def test_setdefault_dict(self):
        from kotti.sqla import NestedMutationDict

        mdict = NestedMutationDict({})
        assert isinstance(mdict.setdefault("bar", {}), NestedMutationDict)