MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_one_or_none_result

Method test_one_or_none_result

test/ext/test_baked.py:159–166  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

157 eq_(bq(fixture_session()).one_or_none(), None)
158
159 def test_one_or_none_result(self):
160 User = self.classes.User
161
162 bq = self.bakery(lambda s: s.query(User))
163 bq += lambda q: q.filter(User.name == "ed")
164
165 u1 = bq(fixture_session()).one_or_none()
166 eq_(u1.name, "ed")
167
168 def test_one_or_none_multiple_result(self):
169 User = self.classes.User

Callers

nothing calls this directly

Calls 6

fixture_sessionFunction · 0.90
eq_Function · 0.90
bakeryMethod · 0.80
queryMethod · 0.45
filterMethod · 0.45
one_or_noneMethod · 0.45

Tested by

no test coverage detected