MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_update_unmapped

Method test_update_unmapped

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

Source from the content-addressed store, hash-verified

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()
182 pairs = [(b_mapper.c.id, b_mapper.c.id)]
183 dest = {}
184 assert_raises_message(
185 orm_exc.UnmappedColumnError,
186 "Can't execute sync rule for source column 't2.id'; "
187 r"mapper 'Mapper\[A\(t1\)\]' does not map this column.",
188 sync._update,
189 a1,
190 a_mapper,
191 dest,
192 "old_",
193 pairs,
194 )
195
196 def test_populate_dict(self):
197 uowcommit, a1, b1, a_mapper, b_mapper = self._fixture()

Callers

nothing calls this directly

Calls 2

_fixtureMethod · 0.95
assert_raises_messageFunction · 0.90

Tested by

no test coverage detected