MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_lazy_clause

Method test_lazy_clause

test/orm/test_cycles.py:247–260  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

245 eq_(t.children[0].parent_uuid, t1.uuid)
246
247 def test_lazy_clause(self):
248 TT = self.classes.TT
249
250 s = fixture_session()
251 t1 = TT()
252 t2 = TT()
253 t1.children.append(t2)
254 s.add(t1)
255 s.flush()
256 s.expunge_all()
257
258 t = s.query(TT).filter_by(id=t2.id).one()
259 eq_(t.uuid, t2.uuid)
260 eq_(t.parent.uuid, t1.uuid)
261
262
263class InheritTestOne(fixtures.MappedTest):

Callers

nothing calls this directly

Calls 10

fixture_sessionFunction · 0.90
eq_Function · 0.90
TTClass · 0.85
appendMethod · 0.45
addMethod · 0.45
flushMethod · 0.45
expunge_allMethod · 0.45
oneMethod · 0.45
filter_byMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected