MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _persistent_m2m_fixture

Method _persistent_m2m_fixture

test/orm/test_dynamic.py:1936–1944  ·  view source on GitHub ↗
(autoflush=True, items_args={})

Source from the content-addressed store, hash-verified

1934 @testing.fixture
1935 def persistent_m2m_fixture(self, order_item_fixture):
1936 def _persistent_m2m_fixture(autoflush=True, items_args={}):
1937 Order, Item = order_item_fixture(items_args=items_args)
1938
1939 o1 = Order()
1940 i1 = Item(description="i1")
1941 s = fixture_session(autoflush=autoflush)
1942 s.add(o1)
1943 s.flush()
1944 return o1, i1, s
1945
1946 yield _persistent_m2m_fixture
1947

Callers

nothing calls this directly

Calls 5

fixture_sessionFunction · 0.90
OrderClass · 0.70
ItemClass · 0.70
addMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected