MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_o2o_delete_old

Method test_o2o_delete_old

test/orm/test_cascade.py:3866–3881  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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 = (
3868 self.classes.Child,
3869 self.classes.Parent,
3870 self.tables.parent,
3871 self.tables.child,
3872 )
3873
3874 self.mapper_registry.map_imperatively(
3875 Parent,
3876 parent,
3877 properties={"child": relationship(Child, uselist=False)},
3878 )
3879 self.mapper_registry.map_imperatively(Child, child)
3880 self._do_move_test(True)
3881 self._do_move_test(False)
3882
3883 def test_o2m_delete_old(self):
3884 Child, Parent, parent, child = (

Callers

nothing calls this directly

Calls 3

_do_move_testMethod · 0.95
relationshipFunction · 0.90
map_imperativelyMethod · 0.80

Tested by

no test coverage detected