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

Method _fixture

test/orm/test_unitofworkv2.py:1779–1802  ·  view source on GitHub ↗
(self, confirm_deleted_rows=True)

Source from the content-addressed store, hash-verified

1777 )
1778
1779 def _fixture(self, confirm_deleted_rows=True):
1780 parent, child = self.tables.parent, self.tables.child
1781
1782 class Parent(BasicEntity):
1783 pass
1784
1785 class Child(BasicEntity):
1786 pass
1787
1788 self.mapper_registry.map_imperatively(
1789 Parent,
1790 parent,
1791 properties={
1792 "child": relationship(
1793 Child,
1794 uselist=False,
1795 cascade="all, delete-orphan",
1796 backref="parent",
1797 )
1798 },
1799 confirm_deleted_rows=confirm_deleted_rows,
1800 )
1801 self.mapper_registry.map_imperatively(Child, child)
1802 return Parent, Child
1803
1804 @testing.requires.sane_rowcount
1805 def test_update_single_missing(self):

Calls 2

relationshipFunction · 0.90
map_imperativelyMethod · 0.80

Tested by

no test coverage detected