(self)
| 2026 | eq_(list(it[0]._mapping.keys()), ["User", "id"]) |
| 2027 | |
| 2028 | def test_none_entity(self): |
| 2029 | s, (u1, u2, u3, u4) = self._fixture() |
| 2030 | User = self.classes.User |
| 2031 | |
| 2032 | ua = aliased(User) |
| 2033 | q = s.query(User, ua) |
| 2034 | |
| 2035 | row = result_tuple(["User", "useralias"]) |
| 2036 | |
| 2037 | def kt(*x): |
| 2038 | return row(x) |
| 2039 | |
| 2040 | collection = [kt(u1, u2), kt(u1, None), kt(u2, u3)] |
| 2041 | with assertions.expect_deprecated_20(merge_result_dep): |
| 2042 | it = q.merge_result(collection) |
| 2043 | eq_( |
| 2044 | [(x and x.id or None, y and y.id or None) for x, y in it], |
| 2045 | [(u1.id, u2.id), (u1.id, None), (u2.id, u3.id)], |
| 2046 | ) |
| 2047 | |
| 2048 | |
| 2049 | class DefaultStrategyOptionsTest(DefaultStrategyOptionsTestFixtures): |
nothing calls this directly
no test coverage detected