def setUp(self):
        global Parent, Child, Base
        Base= declarative_base()

        class Parent(Base):
            __tablename__ = 'parent'
            __table_args__ = {'mysql_engine':'InnoDB'}

            id= Column(Integer, primary_key=True, test_needs_autoincrement=True)

        class Child(Base):
            __tablename__ = 'child'
            __table_args__ = {'mysql_engine':'InnoDB'}

            id= Column(Integer, primary_key=True, test_needs_autoincrement=True)
            parent_id = Column(Integer, ForeignKey('parent.id'))

            parent = relationship(Parent, backref=backref("children"))

        Base.metadata.create_all(engine)

        global sess, p1, p2, c1, c2
        sess = Session(bind=engine)

        p1 = Parent()
        p2 = Parent()
        c1, c2 = Child(), Child()
        c1.parent = p1
        sess.add_all([p1, p2])
        assert c1 in sess

        sess.commit()
dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_load_on_fks.py/LoadOnFKsTest.setUp/original