MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_query_expr

Method test_query_expr

test/orm/test_cache_key.py:140–161  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

138 )
139
140 def test_query_expr(self):
141 (User,) = self.classes("User")
142
143 self._run_cache_key_fixture(
144 lambda: (
145 with_expression(User.name, true()),
146 with_expression(User.name, null()),
147 with_expression(User.name, func.foobar()),
148 with_expression(User.name, User.name == "test"),
149 ),
150 compare_values=True,
151 )
152
153 self._run_cache_key_fixture(
154 lambda: (
155 Load(User).with_expression(User.name, true()),
156 Load(User).with_expression(User.name, null()),
157 Load(User).with_expression(User.name, func.foobar()),
158 Load(User).with_expression(User.name, User.name == "test"),
159 ),
160 compare_values=True,
161 )
162
163 def test_loader_criteria(self):
164 User, Address = self.classes("User", "Address")

Callers

nothing calls this directly

Calls 7

with_expressionFunction · 0.90
trueFunction · 0.90
nullFunction · 0.90
LoadClass · 0.90
foobarMethod · 0.80
with_expressionMethod · 0.80

Tested by

no test coverage detected