def test_dict_wrapper(self):

        someothertable, sometable = self.tables.someothertable, \
                                            self.tables.sometable


        class Foo(object):
            pass
        class Bar(object):
            def __init__(self, data): self.data = data

        mapper(Foo, sometable, properties={
            'bars':relationship(Bar,
                collection_class=collections.column_mapped_collection(
                    someothertable.c.data))
        })
        mapper(Bar, someothertable)

        f = Foo()
        col = collections.collection_adapter(f.bars)
        col.append_with_event(Bar('a'))
        col.append_with_event(Bar('b'))
        sess = create_session()
        sess.add(f)
        sess.flush()
        sess.expunge_all()
        f = sess.query(Foo).get(f.col1)
        assert len(list(f.bars)) == 2

        existing = set([id(b) for b in list(f.bars.values())])

        col = collections.collection_adapter(f.bars)
        col.append_with_event(Bar('b'))
        f.bars['a'] = Bar('a')
        sess.flush()
        sess.expunge_all()
        f = sess.query(Foo).get(f.col1)
        assert len(list(f.bars)) == 2

        replaced = set([id(b) for b in list(f.bars.values())])
        self.assert_(existing != replaced)
Returns a ``FakeFlockerClient`` instance with the nodes
dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_collection.py/CustomCollectionsTest.test_dict_wrapper--crossover with--dataset/ETHPy150Open ClusterHQ/flocker/benchmark/scenarios/test/test_write_request_load.py/write_request_load_scenarioTest.get_fake_flocker_client_instance