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

Method test_already_present

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

Source from the content-addressed store, hash-verified

2629 return canary
2630
2631 def test_already_present(self):
2632 User = self.classes.User
2633
2634 canary = self._fixture()
2635
2636 sess = fixture_session()
2637
2638 u1 = User(name="u1")
2639 sess.add(u1)
2640 sess.flush()
2641
2642 sess.query(User).first()
2643 eq_(canary, [])
2644
2645 def test_changes_reset(self):
2646 """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