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

Method test_multi_bundle

test/orm/test_bundle.py:341–367  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

339 )
340
341 def test_multi_bundle(self):
342 Data = self.classes.Data
343 Other = self.classes.Other
344
345 d1 = aliased(Data)
346
347 b1 = Bundle("b1", d1.d1, d1.d2)
348 b2 = Bundle("b2", Data.d1, Other.o1)
349
350 sess = fixture_session()
351
352 q = (
353 sess.query(b1, b2)
354 .join(Data.others)
355 .join(d1, d1.id == Data.id)
356 .filter(b1.c.d1 == "d3d1")
357 )
358 eq_(
359 q.all(),
360 [
361 (("d3d1", "d3d2"), ("d3d1", "d3o0")),
362 (("d3d1", "d3d2"), ("d3d1", "d3o1")),
363 (("d3d1", "d3d2"), ("d3d1", "d3o2")),
364 (("d3d1", "d3d2"), ("d3d1", "d3o3")),
365 (("d3d1", "d3d2"), ("d3d1", "d3o4")),
366 ],
367 )
368
369 def test_multi_bundle_future(self):
370 Data = self.classes.Data

Callers

nothing calls this directly

Calls 8

aliasedFunction · 0.90
BundleClass · 0.90
fixture_sessionFunction · 0.90
eq_Function · 0.90
filterMethod · 0.45
joinMethod · 0.45
queryMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected