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