(self)
| 212 | eq_(result, [(1, "Some Category"), (3, "Some Category")]) |
| 213 | |
| 214 | def test_withoutjoinedload(self): |
| 215 | Thing, tests, options = ( |
| 216 | self.classes.Thing, |
| 217 | self.tables.tests, |
| 218 | self.tables.options, |
| 219 | ) |
| 220 | |
| 221 | s = fixture_session() |
| 222 | result = ( |
| 223 | s.query(Thing) |
| 224 | .select_from( |
| 225 | tests.outerjoin( |
| 226 | options, |
| 227 | sa.and_( |
| 228 | tests.c.id == options.c.test_id, |
| 229 | tests.c.owner_id == options.c.owner_id, |
| 230 | ), |
| 231 | ) |
| 232 | ) |
| 233 | .filter( |
| 234 | sa.and_( |
| 235 | tests.c.owner_id == 1, |
| 236 | sa.or_( |
| 237 | options.c.someoption == None, # noqa |
| 238 | options.c.someoption == False, |
| 239 | ), |
| 240 | ) |
| 241 | ) |
| 242 | ) |
| 243 | |
| 244 | result_str = ["%d %s" % (t.id, t.category.name) for t in result] |
| 245 | eq_(result_str, ["1 Some Category", "3 Some Category"]) |
| 246 | |
| 247 | def test_withjoinedload(self): |
| 248 | """ |
nothing calls this directly
no test coverage detected