MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / test_already_present

Method test_already_present

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

Source from the content-addressed store, hash-verified

2893 return canary
2894
2895 def test_already_present(self):
2896 User = self.classes.User
2897
2898 canary = self._fixture()
2899
2900 sess = fixture_session()
2901
2902 u1 = User(name="u1")
2903 sess.add(u1)
2904 sess.flush()
2905
2906 sess.query(User).first()
2907 eq_(canary, [])
2908
2909 def test_changes_reset(self):
2910 """test the contract of load/refresh such that history is reset.

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected