MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_chained_add_operator

Method test_chained_add_operator

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

Source from the content-addressed store, hash-verified

107 self._assert_cache_key(q2._cache_key, [l1, l2])
108
109 def test_chained_add_operator(self):
110 User = self.classes.User
111 session = fixture_session()
112
113 def l1():
114 return session.query(User)
115
116 def l2(q):
117 return q.filter(User.name == bindparam("name"))
118
119 q1 = self.bakery(l1)
120
121 q2 = q1 + l2
122 is_not(q2, q1)
123
124 self._assert_cache_key(q1._cache_key, [l1])
125 self._assert_cache_key(q2._cache_key, [l1, l2])
126
127
128class LikeQueryTest(BakedTest):

Callers

nothing calls this directly

Calls 4

_assert_cache_keyMethod · 0.95
fixture_sessionFunction · 0.90
is_notFunction · 0.90
bakeryMethod · 0.80

Tested by

no test coverage detected