MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_populate_dict_unmapped

Method test_populate_dict_unmapped

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

Source from the content-addressed store, hash-verified

202 eq_(dest, {"id": 10})
203
204 def test_populate_dict_unmapped(self):
205 uowcommit, a1, b1, a_mapper, b_mapper = self._fixture()
206 a1.obj().id = 10
207 pairs = [(b_mapper.c.id, b_mapper.c.id)]
208 dest = {}
209 assert_raises_message(
210 orm_exc.UnmappedColumnError,
211 "Can't execute sync rule for source column 't2.id'; "
212 r"mapper 'Mapper\[A\(t1\)\]' does not map this column.",
213 sync._populate_dict,
214 a1,
215 a_mapper,
216 dest,
217 pairs,
218 )
219
220 def test_source_modified_unmodified(self):
221 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