MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_inner_joinedload_w_limit

Method test_inner_joinedload_w_limit

test/orm/test_lockmode.py:83–97  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

81 cls.mapper_registry.map_imperatively(Address, addresses)
82
83 def test_inner_joinedload_w_limit(self):
84 User = self.classes.User
85 sess = fixture_session()
86 q = (
87 sess.query(User)
88 .options(joinedload(User.addresses, innerjoin=True))
89 .with_for_update()
90 .limit(1)
91 )
92
93 if testing.against("oracle"):
94 assert_raises_message(exc.DatabaseError, "ORA-02014", q.all)
95 else:
96 q.all()
97 sess.close()
98
99 def test_inner_joinedload_wo_limit(self):
100 User = self.classes.User

Callers

nothing calls this directly

Calls 10

fixture_sessionFunction · 0.90
joinedloadFunction · 0.90
assert_raises_messageFunction · 0.90
limitMethod · 0.45
with_for_updateMethod · 0.45
optionsMethod · 0.45
queryMethod · 0.45
againstMethod · 0.45
allMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected