MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_object_replace

Method test_object_replace

test/orm/test_attributes.py:1847–1855  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1845 eq_(self._someattr_history(f), ((), (), ()))
1846
1847 def test_object_replace(self):
1848 Foo, Bar = self._two_obj_fixture(uselist=False)
1849 f = Foo()
1850 b1, b2 = Bar(), Bar()
1851 f.someattr = b1
1852 self._commit_someattr(f)
1853
1854 f.someattr = b2
1855 eq_(self._someattr_history(f), ([b2], (), [b1]))
1856
1857 def test_object_set_none(self):
1858 Foo, Bar = self._two_obj_fixture(uselist=False)

Callers

nothing calls this directly

Calls 6

_two_obj_fixtureMethod · 0.95
_commit_someattrMethod · 0.95
_someattr_historyMethod · 0.95
eq_Function · 0.90
FooClass · 0.70
BarClass · 0.70

Tested by

no test coverage detected