MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _assert_col

Method _assert_col

test/orm/test_unitofworkv2.py:3681–3691  ·  view source on GitHub ↗
(self, name, value)

Source from the content-addressed store, hash-verified

3679 )
3680
3681 def _assert_col(self, name, value):
3682 Thing, AltNameThing = self.classes.Thing, self.classes.AltNameThing
3683 s = fixture_session()
3684
3685 col = getattr(Thing, name)
3686 obj = s.query(col).filter(col == value).one()
3687 eq_(obj[0], value)
3688
3689 col = getattr(AltNameThing, "_foo_" + name)
3690 obj = s.query(col).filter(col == value).one()
3691 eq_(obj[0], value)
3692
3693 def _test_insert(self, attr, expected):
3694 Thing, AltNameThing = self.classes.Thing, self.classes.AltNameThing

Callers 4

_test_insertMethod · 0.95
_test_bulk_insertMethod · 0.95
_test_insert_novalueMethod · 0.95

Calls 5

fixture_sessionFunction · 0.90
eq_Function · 0.90
oneMethod · 0.45
filterMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected