MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _test_o2m_lazyload

Method _test_o2m_lazyload

test/orm/test_query.py:7345–7351  ·  view source on GitHub ↗
(self, fixture)

Source from the content-addressed store, hash-verified

7343 assert u is u2
7344
7345 def _test_o2m_lazyload(self, fixture):
7346 User, Address = self.classes("User", "Address")
7347
7348 s = fixture_session(query_cls=fixture())
7349
7350 u1 = s.query(User).filter(User.id == 7).first()
7351 eq_(u1.addresses, [Address(id=1)])
7352
7353 def _test_m2o_lazyload(self, fixture):
7354 User, Address = self.classes("User", "Address")

Callers 3

test_fn_o2m_lazyloadMethod · 0.95

Calls 7

fixture_sessionFunction · 0.90
eq_Function · 0.90
AddressClass · 0.70
fixtureFunction · 0.50
firstMethod · 0.45
filterMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected