(self)
| 260 | sess.commit() |
| 261 | |
| 262 | def test_lazyload(self): |
| 263 | A, B = self.classes("A", "B") |
| 264 | |
| 265 | sess = fixture_session() |
| 266 | a1 = sess.query(A).first() |
| 267 | |
| 268 | with self.sql_execution_asserter() as asserter: |
| 269 | # note this is many-to-one. use_get is unconditionally turned |
| 270 | # off for relationship to aliased class for now. |
| 271 | eq_(a1.b, B(id=1)) |
| 272 | |
| 273 | asserter.assert_( |
| 274 | CompiledSQL( |
| 275 | "SELECT b.id FROM b JOIN d ON d.b_id = b.id " |
| 276 | "JOIN c ON c.id = d.c_id WHERE :param_1 = b.id", |
| 277 | [{"param_1": 1}], |
| 278 | ) |
| 279 | ) |
| 280 | |
| 281 | def test_joinedload(self): |
| 282 | A, B = self.classes("A", "B") |
nothing calls this directly
no test coverage detected