MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_populate_flag_cascaded

Method test_populate_flag_cascaded

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

Source from the content-addressed store, hash-verified

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()
90 pairs = [(a_mapper.c.id, b_mapper.c.id)]
91 a1.obj().id = 7
92 assert "id" not in b1.obj().__dict__
93 sync._populate(a1, a_mapper, b1, b_mapper, pairs, uowcommit, True)
94 eq_(b1.obj().id, 7)
95 eq_(b1.obj().__dict__["id"], 7)
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()

Callers

nothing calls this directly

Calls 2

_fixtureMethod · 0.95
eq_Function · 0.90

Tested by

no test coverage detected