MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_update

Method test_update

test/orm/test_sync.py:170–178  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

168 )
169
170 def test_update(self):
171 uowcommit, a1, b1, a_mapper, b_mapper = self._fixture()
172 a1.obj().id = 10
173 a1._commit_all(a1.dict)
174 a1.obj().id = 12
175 pairs = [(a_mapper.c.id, b_mapper.c.id)]
176 dest = {}
177 sync._update(a1, a_mapper, dest, "old_", pairs)
178 eq_(dest, {"id": 12, "old_id": 10})
179
180 def test_update_unmapped(self):
181 uowcommit, a1, b1, a_mapper, b_mapper = self._fixture()

Callers

nothing calls this directly

Calls 4

_fixtureMethod · 0.95
eq_Function · 0.90
_commit_allMethod · 0.80
_updateMethod · 0.45

Tested by

no test coverage detected