MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_clear

Method test_clear

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

Source from the content-addressed store, hash-verified

131 )
132
133 def test_clear(self):
134 uowcommit, a1, b1, a_mapper, b_mapper = self._fixture()
135 pairs = [(a_mapper.c.id, b_mapper.c.t1id)]
136 b1.obj().t1id = 8
137 eq_(b1.obj().__dict__["t1id"], 8)
138 sync._clear(b1, b_mapper, pairs)
139 eq_(b1.obj().__dict__["t1id"], None)
140
141 def test_clear_pk(self):
142 uowcommit, a1, b1, a_mapper, b_mapper = self._fixture()

Callers

nothing calls this directly

Calls 3

_fixtureMethod · 0.95
eq_Function · 0.90
_clearMethod · 0.45

Tested by

no test coverage detected