MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_query_two

Method test_query_two

test/ext/test_serializer.py:197–205  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

195 )
196
197 def test_query_two(self):
198 q = (
199 Session.query(User)
200 .join(User.addresses)
201 .filter(Address.email.like("%fred%"))
202 )
203 q2 = serializer.loads(serializer.dumps(q, -1), users.metadata, Session)
204 eq_(q2.all(), [User(name="fred")])
205 eq_(list(q2.with_entities(User.id, User.name)), [(9, "fred")])
206
207 def test_query_three(self):
208 ua = aliased(User)

Callers

nothing calls this directly

Calls 10

eq_Function · 0.90
with_entitiesMethod · 0.80
UserClass · 0.70
filterMethod · 0.45
joinMethod · 0.45
queryMethod · 0.45
likeMethod · 0.45
loadsMethod · 0.45
dumpsMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected