MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_unsaved_group_2

Method test_unsaved_group_2

test/orm/test_deferred.py:308–327  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

306 self.sql_count_(0, go)
307
308 def test_unsaved_group_2(self):
309 orders, Order = self.tables.orders, self.classes.Order
310
311 self.mapper_registry.map_imperatively(
312 Order,
313 orders,
314 properties=dict(
315 description=deferred(orders.c.description, group="primary"),
316 opened=deferred(orders.c.isopen, group="primary"),
317 ),
318 )
319
320 sess = fixture_session()
321 o = Order()
322 sess.add(o)
323
324 def go():
325 o.description = "some description"
326
327 self.sql_count_(0, go)
328
329 def test_save(self):
330 Order, orders = self.classes.Order, self.tables.orders

Callers

nothing calls this directly

Calls 6

deferredFunction · 0.90
fixture_sessionFunction · 0.90
map_imperativelyMethod · 0.80
sql_count_Method · 0.80
OrderClass · 0.70
addMethod · 0.45

Tested by

no test coverage detected