| 4321 | |
| 4322 | @classmethod |
| 4323 | def insert_data(cls, connection): |
| 4324 | ParentA, ParentB, ChildA, ChildB = cls.classes( |
| 4325 | "ParentA", "ParentB", "ChildA", "ChildB" |
| 4326 | ) |
| 4327 | session = Session(connection) |
| 4328 | parent_a = ParentA(id=1) |
| 4329 | parent_b = ParentB(id=2) |
| 4330 | for i in range(10): |
| 4331 | parent_a.children.append(ChildA()) |
| 4332 | parent_b.children.append(ChildB()) |
| 4333 | session.add_all([parent_a, parent_b]) |
| 4334 | |
| 4335 | session.commit() |
| 4336 | |
| 4337 | def test_load_both_wpoly(self): |
| 4338 | GenericParent, ParentA, ParentB, ChildA, ChildB = self.classes( |