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

Method test_was_expired

test/orm/test_events.py:2972–2985  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2970 eq_(canary, [("refresh", {"id", "name"})])
2971
2972 def test_was_expired(self):
2973 User = self.classes.User
2974
2975 canary = self._fixture()
2976
2977 sess = fixture_session()
2978
2979 u1 = User(name="u1")
2980 sess.add(u1)
2981 sess.flush()
2982 sess.expire(u1)
2983
2984 sess.query(User).first()
2985 eq_(canary, [("refresh", {"id", "name"})])
2986
2987 def test_was_expired_via_commit(self):
2988 User = self.classes.User

Callers

nothing calls this directly

Calls 9

_fixtureMethod · 0.95
fixture_sessionFunction · 0.90
eq_Function · 0.90
UserClass · 0.70
addMethod · 0.45
flushMethod · 0.45
expireMethod · 0.45
firstMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected