| 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() |