MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_populate

Method test_populate

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

Source from the content-addressed store, hash-verified

76 )
77
78 def test_populate(self):
79 uowcommit, a1, b1, a_mapper, b_mapper = self._fixture()
80 pairs = [(a_mapper.c.id, b_mapper.c.id)]
81 a1.obj().id = 7
82 assert "id" not in b1.obj().__dict__
83 sync._populate(a1, a_mapper, b1, b_mapper, pairs, uowcommit, False)
84 eq_(b1.obj().id, 7)
85 eq_(b1.obj().__dict__["id"], 7)
86 assert ("pk_cascaded", b1, b_mapper.c.id) not in uowcommit.attributes
87
88 def test_populate_flag_cascaded(self):
89 uowcommit, a1, b1, a_mapper, b_mapper = self._fixture()

Callers

nothing calls this directly

Calls 2

_fixtureMethod · 0.95
eq_Function · 0.90

Tested by

no test coverage detected