MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_outer_joinedload_w_limit

Method test_outer_joinedload_w_limit

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

Source from the content-addressed store, hash-verified

105 sess.close()
106
107 def test_outer_joinedload_w_limit(self):
108 User = self.classes.User
109 sess = fixture_session()
110 q = sess.query(User).options(
111 joinedload(User.addresses, innerjoin=False)
112 )
113
114 if testing.against("postgresql"):
115 q = q.with_for_update(of=User)
116 else:
117 q = q.with_for_update()
118
119 q = q.limit(1)
120
121 if testing.against("oracle"):
122 assert_raises_message(exc.DatabaseError, "ORA-02014", q.all)
123 else:
124 q.all()
125 sess.close()
126
127 def test_outer_joinedload_wo_limit(self):
128 User = self.classes.User

Callers

nothing calls this directly

Calls 10

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

Tested by

no test coverage detected