(self, delete_old)
| 3840 | pass |
| 3841 | |
| 3842 | def _do_move_test(self, delete_old): |
| 3843 | Parent, Child = self.classes.Parent, self.classes.Child |
| 3844 | |
| 3845 | with fixture_session(autoflush=False) as sess: |
| 3846 | p1, p2, c1 = Parent(), Parent(), Child() |
| 3847 | if Parent.child.property.uselist: |
| 3848 | p1.child.append(c1) |
| 3849 | else: |
| 3850 | p1.child = c1 |
| 3851 | sess.add_all([p1, c1]) |
| 3852 | sess.flush() |
| 3853 | |
| 3854 | if delete_old: |
| 3855 | sess.delete(p1) |
| 3856 | |
| 3857 | if Parent.child.property.uselist: |
| 3858 | p2.child.append(c1) |
| 3859 | else: |
| 3860 | p2.child = c1 |
| 3861 | sess.add(p2) |
| 3862 | |
| 3863 | sess.flush() |
| 3864 | eq_(sess.query(Child).filter(Child.parent_id == p2.id).all(), [c1]) |
| 3865 | |
| 3866 | def test_o2o_delete_old(self): |
| 3867 | Child, Parent, parent, child = ( |
no test coverage detected