MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_chained_add

Method test_chained_add

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

Source from the content-addressed store, hash-verified

89 self._assert_cache_key(q1._cache_key, [l1, l2])
90
91 def test_chained_add(self):
92 User = self.classes.User
93 session = fixture_session()
94
95 def l1():
96 return session.query(User)
97
98 def l2(q):
99 return q.filter(User.name == bindparam("name"))
100
101 q1 = self.bakery(l1)
102
103 q2 = q1.with_criteria(l2)
104 is_not(q2, q1)
105
106 self._assert_cache_key(q1._cache_key, [l1])
107 self._assert_cache_key(q2._cache_key, [l1, l2])
108
109 def test_chained_add_operator(self):
110 User = self.classes.User

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected