MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _test_session

Method _test_session

test/orm/test_session.py:2445–2466  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

2443 state._dispose()
2444
2445 def _test_session(self, **kwargs):
2446 T = self.classes.T
2447
2448 sess = Session(config.db, **kwargs)
2449
2450 data = o1, o2, o3, o4, o5 = [
2451 T("t1"),
2452 T("t2"),
2453 T("t3"),
2454 T("t4"),
2455 T("t5"),
2456 ]
2457
2458 sess.add_all(data)
2459
2460 sess.commit()
2461
2462 o1.data = "t1modified"
2463 o5.data = "t5modified"
2464
2465 self._set_imap_in_disposal(sess, o2, o4, o5)
2466 return sess
2467
2468 def test_flush(self):
2469 self._test_session().flush()

Callers 7

test_flushMethod · 0.95
test_clearMethod · 0.95
test_closeMethod · 0.95
test_invalidateMethod · 0.95
test_expunge_allMethod · 0.95
test_expire_allMethod · 0.95
test_rollbackMethod · 0.95

Calls 5

add_allMethod · 0.95
commitMethod · 0.95
_set_imap_in_disposalMethod · 0.95
SessionClass · 0.90
TClass · 0.70

Tested by

no test coverage detected