MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_with_pending_autoflush

Method test_with_pending_autoflush

test/orm/test_deprecations.py:1896–1908  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1894 )
1895
1896 def test_with_pending_autoflush(self):
1897 Order, User = self.classes.Order, self.classes.User
1898
1899 sess = fixture_session()
1900
1901 o1 = sess.query(Order).first()
1902 opending = Order(id=20, user_id=o1.user_id)
1903 sess.add(opending)
1904 with assertions.expect_deprecated_20(query_wparent_dep):
1905 eq_(
1906 sess.query(User).with_parent(opending, Order.user).one(),
1907 User(id=o1.user_id),
1908 )
1909
1910 def test_with_pending_no_autoflush(self):
1911 Order, User = self.classes.Order, self.classes.User

Callers

nothing calls this directly

Calls 9

fixture_sessionFunction · 0.90
eq_Function · 0.90
with_parentMethod · 0.80
OrderClass · 0.70
UserClass · 0.70
firstMethod · 0.45
queryMethod · 0.45
addMethod · 0.45
oneMethod · 0.45

Tested by

no test coverage detected