def test_lazyload(self):

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

        class Foo(object):
            pass
        class Bar(object):
            pass
        mapper(Foo, sometable, properties={
            'bars': relationship(Bar, collection_class=set)
        })
        mapper(Bar, someothertable)
        f = Foo()
        f.bars.add(Bar())
        f.bars.add(Bar())
        sess = create_session()
        sess.add(f)
        sess.flush()
        sess.expunge_all()
        f = sess.query(Foo).get(f.col1)
        assert len(list(f.bars)) == 2
        f.bars.clear()
Get the mimetype to be used for the response.
dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_collection.py/CustomCollectionsTest.test_lazyload--crossover with--dataset/ETHPy150Open ofri/Open-Knesset/hashnav/base.py/View.get_mimetype