MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_multiple_updates

Method test_multiple_updates

test/orm/test_versioning.py:256–273  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

254 s1.commit()
255
256 def test_multiple_updates(self):
257 Foo = self.classes.Foo
258
259 s1 = self._fixture()
260 f1 = Foo(value="f1")
261 f2 = Foo(value="f2")
262 s1.add_all((f1, f2))
263 s1.commit()
264
265 f1.value = "f1rev2"
266 f2.value = "f2rev2"
267 with conditional_sane_rowcount_warnings(update=True):
268 s1.commit()
269
270 eq_(
271 s1.query(Foo.id, Foo.value, Foo.version_id).order_by(Foo.id).all(),
272 [(f1.id, "f1rev2", 2), (f2.id, "f2rev2", 2)],
273 )
274
275 def test_bulk_insert(self):
276 Foo = self.classes.Foo

Callers

nothing calls this directly

Calls 9

_fixtureMethod · 0.95
eq_Function · 0.90
FooClass · 0.70
add_allMethod · 0.45
commitMethod · 0.45
allMethod · 0.45
order_byMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected