MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _test_insert

Method _test_insert

test/orm/test_unitofworkv2.py:3693–3705  ·  view source on GitHub ↗
(self, attr, expected)

Source from the content-addressed store, hash-verified

3691 eq_(obj[0], value)
3692
3693 def _test_insert(self, attr, expected):
3694 Thing, AltNameThing = self.classes.Thing, self.classes.AltNameThing
3695
3696 s = fixture_session()
3697 t1 = Thing(**{attr: None})
3698 s.add(t1)
3699
3700 t2 = AltNameThing(**{"_foo_" + attr: None})
3701 s.add(t2)
3702
3703 s.commit()
3704
3705 self._assert_col(attr, expected)
3706
3707 def _test_bulk_insert(self, attr, expected):
3708 Thing, AltNameThing = self.classes.Thing, self.classes.AltNameThing

Calls 6

_assert_colMethod · 0.95
fixture_sessionFunction · 0.90
AltNameThingClass · 0.85
ThingClass · 0.70
addMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected