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

Method test_o2o_backref_delete_old

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

Source from the content-addressed store, hash-verified

3898 self._do_move_test(False)
3899
3900 def test_o2o_backref_delete_old(self):
3901 Child, Parent, parent, child = (
3902 self.classes.Child,
3903 self.classes.Parent,
3904 self.tables.parent,
3905 self.tables.child,
3906 )
3907
3908 self.mapper_registry.map_imperatively(
3909 Parent,
3910 parent,
3911 properties={
3912 "child": relationship(
3913 Child,
3914 uselist=False,
3915 backref=backref(
3916 "parent",
3917 ),
3918 )
3919 },
3920 )
3921 self.mapper_registry.map_imperatively(Child, child)
3922 self._do_move_test(True)
3923 self._do_move_test(False)
3924
3925 def test_o2o_delcascade_delete_old(self):
3926 Child, Parent, parent, child = (

Callers

nothing calls this directly

Calls 4

_do_move_testMethod · 0.95
relationshipFunction · 0.90
backrefFunction · 0.90
map_imperativelyMethod · 0.80

Tested by

no test coverage detected