what happens when we try to defer the primary key?
(self)
| 186 | ) |
| 187 | |
| 188 | def test_defer_primary_key(self): |
| 189 | """what happens when we try to defer the primary key?""" |
| 190 | |
| 191 | Order, orders = self.classes.Order, self.tables.orders |
| 192 | |
| 193 | self.mapper_registry.map_imperatively( |
| 194 | Order, orders, properties={"id": deferred(orders.c.id)} |
| 195 | ) |
| 196 | |
| 197 | # right now, it's not that graceful :) |
| 198 | q = fixture_session().query(Order) |
| 199 | assert_raises_message( |
| 200 | sa.exc.NoSuchColumnError, "Could not locate", q.first |
| 201 | ) |
| 202 | |
| 203 | @testing.combinations(True, False, argnames="use_wildcard") |
| 204 | def test_defer_option_primary_key(self, use_wildcard): |
nothing calls this directly
no test coverage detected