MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_explicit_join_10

Method test_explicit_join_10

test/orm/test_joins.py:2696–2714  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2694 assert node.data == "n122"
2695
2696 def test_explicit_join_10(self):
2697 Node = self.classes.Node
2698 sess = fixture_session()
2699 n1 = aliased(Node)
2700 n2 = aliased(Node)
2701
2702 eq_(
2703 list(
2704 sess.query(Node)
2705 .select_from(join(Node, n1, Node.parent).join(n2, n1.parent))
2706 .filter(
2707 and_(
2708 Node.data == "n122", n1.data == "n12", n2.data == "n1"
2709 )
2710 )
2711 .with_entities(Node.data, n1.data, n2.data)
2712 ),
2713 [("n122", "n12", "n1")],
2714 )
2715
2716 def test_join_to_nonaliased(self):
2717 Node = self.classes.Node

Callers

nothing calls this directly

Calls 10

fixture_sessionFunction · 0.90
aliasedFunction · 0.90
eq_Function · 0.90
joinFunction · 0.90
and_Function · 0.90
with_entitiesMethod · 0.80
filterMethod · 0.45
select_fromMethod · 0.45
queryMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected