def _setup_crumblers(self, get_crumbler):
        foo_crumbler = mock.Mock(spec=Crumbler())
        foo_crumbler.crumble.side_effect = lambda item, attrs: item.inner
        foo_crumbler.get_extra_attrs_from_db.return_value = {}
        bar_crumbler = mock.Mock(spec=Crumbler())
        bar_crumbler.crumble.side_effect = lambda item, attrs: item.inner
        bar_crumbler.get_extra_attrs_from_db.return_value = {}
        crumbler_mapping = {SerializeTest._Foo: foo_crumbler, SerializeTest._Bar: bar_crumbler}
        get_crumbler.side_effect = lambda item, registry: crumbler_mapping[item.__class__]

        return (foo_crumbler, bar_crumbler)
Other exception from func test in a loop
dataset/ETHPy150Open dropbox/changes/tests/changes/api/serializer/test_base.py/SerializeTest._setup_crumblers--crossover with--dataset/ETHPy150Open skyostil/tracy/src/generator/Cheetah/Tests/NameMapper.py/VFN.test54