MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_update_crit_fetch

Method test_update_crit_fetch

test/orm/test_composites.py:301–317  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

299 eq_(e1.end, Point(17, 8))
300
301 def test_update_crit_fetch(self):
302 Edge, Point = (self.classes.Edge, self.classes.Point)
303
304 sess = self._fixture()
305
306 e1 = sess.query(Edge).filter(Edge.start == Point(14, 5)).one()
307
308 eq_(e1.end, Point(2, 7))
309
310 q = sess.query(Edge).filter(Edge.start == Point(14, 5))
311 q.update({Edge.end: Point(16, 10)}, synchronize_session="fetch")
312
313 eq_(e1.end, Point(16, 10))
314
315 q.update({Edge.end: Point(17, 8)}, synchronize_session="fetch")
316
317 eq_(e1.end, Point(17, 8))
318
319 @testing.combinations(
320 ("legacy",),

Callers

nothing calls this directly

Calls 7

_fixtureMethod · 0.95
eq_Function · 0.90
PointClass · 0.70
oneMethod · 0.45
filterMethod · 0.45
queryMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected