MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_populate_unmapped_source

Method test_populate_unmapped_source

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

Source from the content-addressed store, hash-verified

96 eq_(uowcommit.attributes[("pk_cascaded", b1, b_mapper.c.id)], True)
97
98 def test_populate_unmapped_source(self):
99 uowcommit, a1, b1, a_mapper, b_mapper = self._fixture()
100 pairs = [(b_mapper.c.id, b_mapper.c.id)]
101 assert_raises_message(
102 orm_exc.UnmappedColumnError,
103 "Can't execute sync rule for source column 't2.id'; "
104 r"mapper 'Mapper\[A\(t1\)\]' does not map this column.",
105 sync._populate,
106 a1,
107 a_mapper,
108 b1,
109 b_mapper,
110 pairs,
111 uowcommit,
112 False,
113 )
114
115 def test_populate_unmapped_dest(self):
116 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