MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_object_set_none

Method test_object_set_none

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

Source from the content-addressed store, hash-verified

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)
1859 f = Foo()
1860 b1 = Bar()
1861 f.someattr = b1
1862 self._commit_someattr(f)
1863
1864 f.someattr = None
1865 eq_(self._someattr_history(f), ([None], (), [b1]))
1866
1867 def test_object_set_none_expired(self):
1868 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